homepage Welcome to WebmasterWorld Guest from 54.205.254.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Using the window.print() method in Javascript
Crossbrowser support
anubis




msg:1488299
 4:54 pm on Jun 5, 2003 (gmt 0)

Hello

I have a web page at the following url

<snip>

At the bottom of the page is a link to print the page. Now this seems to work on Windows PC's but not on Mac in Internet Explorer.

The code i have used is below and I just wondered if any one knew of a way to get this to work in Explorer. The code seem to work in Netscape on the Mac and as I have said there is no problem in Explorer on windows PC's

<a href="JavaScript: onclick=window.print();" class="hlink">print</a>

Any ideas on this would be appreciated.

Cheers

[edited by: korkus2000 at 5:07 pm (utc) on June 5, 2003]
[edit reason] no personal URLs please [/edit]

 

korkus2000




msg:1488300
 5:14 pm on Jun 5, 2003 (gmt 0)

IE5+ will do window.print. Call the method without the onclick in the href like:

<a href="JavaScript:window.print();" class="hlink">print</a>

papabaer




msg:1488301
 5:22 pm on Jun 5, 2003 (gmt 0)

Save the code and drop the link. "Print" is just a mouseclick or keystroke away by default.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved