HighDots Forums  

Print command problem

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Print command problem in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sticker webforumsuser@macromedia.com
 
Posts: n/a

Default Print command problem - 01-09-2004 , 04:17 PM






Hey Guys,

Small problem I'm having...

I'm using Dreamweaver 4 - Never upgraded! And I have a map JPEG for a site - nearly fills a 800 X 600 page, I want to put a "print Map" command at the top of the map - Is there a facility in Dreamweaver 4 to do this?

Thanks in advance!



-= FIRE WALK WITH ME =-

Reply With Quote
  #2  
Old   
darrel
 
Posts: n/a

Default Re: Print command problem - 01-09-2004 , 04:26 PM






Quote:
I'm using Dreamweaver 4 - Never upgraded! And I have a map JPEG for a
site - nearly fills a 800 X 600 page, I want to put a "print Map" command at
the top of the map - Is there a facility in Dreamweaver 4 to do this?

You can use javascript to call the browser's print function (in some, but
not all) browsers.

But I have to ask: why? There's a perfectly usable PRINT icon in the browser
toolbar already, not to mention the FILE >> PRINT command.

-Darrel




Reply With Quote
  #3  
Old   
sticker webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Print command problem - 01-13-2004 , 04:28 AM



Quote:
I'm using Dreamweaver 4 - Never upgraded! And I have a map JPEG for a
site - nearly fills a 800 X 600 page, I want to put a "print Map" command at
the top of the map - Is there a facility in Dreamweaver 4 to do this?

You can use javascript to call the browser's print function (in some, but
not all) browsers.

But I have to ask: why? There's a perfectly usable PRINT icon in the browser
toolbar already, not to mention the FILE >> PRINT command.

-Darrel

I'm designing a website with a city map in it, and I want to let visitors to the site have a click option to print the map I have (say a printer frendly map) Does Dreamweaver do this?

Cheers!


-= FIRE WALK WITH ME =-


Reply With Quote
  #4  
Old   
babaroberts webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Print command problem - 01-13-2004 , 10:09 AM



there are loads of ways to do this, heres 3:

<!--auto prints the page when it loads-->
<body onLoad="window.print()">

<!--print button-->
<script language="Javascript">
<!--

var message = "Print this Page";

function printpage() {
window.print();
}

document.write("<form><input type=button "
+"value=\""+message+"\" onClick=\"printpage()\"></form>");

//-->
</script>

<!--print link-->
<a href="javascriptrint()">Print</a>



Reply With Quote
  #5  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Print command problem - 01-13-2004 , 10:14 AM



All fail on IE5x/Mac. So, it's not really fair to say there are loads of
ways, is it?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"babaroberts" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
there are loads of ways to do this, heres 3:

!--auto prints the page when it loads--
body onLoad="window.print()"

!--print button--
script language="Javascript"
!--

var message = "Print this Page";

function printpage() {
window.print();
}

document.write("<form><input type=button "
+"value=\""+message+"\" onClick=\"printpage()\"></form>");

//--
/script

!--print link--
a href="javascriptrint()">Print</a





Reply With Quote
  #6  
Old   
babaroberts webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Print command problem - 01-14-2004 , 05:09 AM



thanks murray, that was a really constructive post.

ive had the print button working on win 95 ie5, win 98ie6, win xp ie6, dont know about 5.5 or mac, but you cant please everyone....

OR CAN YOU?

show me a mac print button code and i can show you how to please everyone...




Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Print command problem - 01-14-2004 , 07:02 AM



babaroberts:

Here is the best I have found for Macs.

Put this in the head of the document -

<script>
function print_page(where){
var is_mac=(navigator.platform.indexOf("ac") != -1);
(document.all && is_mac)?
alert("Select \"Print\" from the menu") : where? where.window.print() :
window.print();
}
</script>

Put this in the body of the document -

<a href="javascriptrint_page()">Print this</a>



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"babaroberts" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
thanks murray, that was a really constructive post.

ive had the print button working on win 95 ie5, win 98ie6, win xp ie6,
dont know about 5.5 or mac, but you cant please everyone....

OR CAN YOU?

show me a mac print button code and i can show you how to please
everyone...





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.