HighDots Forums  

Print page button

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Print page button in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Morse
 
Posts: n/a

Default Print page button - 07-18-2003 , 07:39 PM






I put a print page link on a page with the following code:
<td><a href="javascript:;" onClick="window.print(); return false">Print
Page</a></td>

Works fine in IE and NN on a PC and NN on a Mac. It won't work on IE on a
Mac. How can I get it to work in IE?
Thanks
Mark


Reply With Quote
  #2  
Old   
Alan Ames
 
Posts: n/a

Default Re: Print page button - 07-18-2003 , 07:50 PM






It won't work on ie/macintosh.

it just won't.

so- either don't bother with the javascript Print button, because it's
redundant (because every browser has a Print button, unless the toolbar has
been hidden)

or- ignore that it doesn't work. Unless you've hidden the browser's toolbar-
the mac/ie people will be still able to print the page, if they want to.

or- use a modified javascript that tests for ie/mac
from Mick of mickweb-
function to put in head-

<script language="Javascript">
function print_page(){
if ( navigator.platform.toLowerCase().indexOf("mac") != -1 &&
!window.netscape){
alert("Press command + P");
}else{ window.print();
}
}
</script>

link-
<a href="javascriptrint_page();">Print</a>



Quote:
It won't work on IE on a
Mac. How can I get it to work in IE?
--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer



Reply With Quote
  #3  
Old   
Mark Morse
 
Posts: n/a

Default Re: Print page button - 07-18-2003 , 07:54 PM



Thanks much for the info Alan. I didn't want the button but the client
insists on it. You know how it goes, they think everyone is a dumb as they
are.
mark

Quote:
It won't work on ie/macintosh.

it just won't.

so- either don't bother with the javascript Print button, because it's
redundant (because every browser has a Print button, unless the toolbar has
been hidden)

or- ignore that it doesn't work. Unless you've hidden the browser's toolbar-
the mac/ie people will be still able to print the page, if they want to.

or- use a modified javascript that tests for ie/mac
from Mick of mickweb-
function to put in head-

script language="Javascript"
function print_page(){
if ( navigator.platform.toLowerCase().indexOf("mac") != -1 &&
!window.netscape){
alert("Press command + P");
}else{ window.print();
}
}
/script

link-
a href="javascriptrint_page();">Print</a



It won't work on IE on a
Mac. How can I get it to work in IE?

--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer




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.