26 Sep 2007 02:42:55 pm
Permalink Javascript a Print Button to Print
Here's the syntax used to print a document:

Code :
window.print()


Methods:

Form
Code :
<form>
<input type="button" value="Print this page" onClick="window.print()">
</form>


Href - Return False - Cancels actual link
Code :
<a href="whatever.htm" onClick="window.print();return false"><img src="print.gif"></a>


Href - Javascript URL
Code :
<a href="javascript:window.print()"><img src="print.gif"></a>


*Reference:
http://www.javascriptkit.com/howto/newtech2.shtml
Category : Accessibility | Posted By : calamity007 | Comments [0] | Trackbacks [0]
Trackbacks
The URL to TrackBack this entry is :
http://www.calamnetdesigns.com/trackback.php/77
Comments

Add Your Comment

Subject

Comments

Name

Email Address (Optional)

Home Page (Optional)

Security Code

Please enter the security code as displayed :



Aug 2010 September 2010 Oct 2010
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30   
 

Categories
[11]
• CSS
[15]
[29]
• Events
[2]
• Fonts
[3]
• General
[10]
[2]
• RSS
[2]
[2]
[5]
 

 

Archives
[2]
[5]
[1]
[3]
[5]
[2]
[4]
[2]
[28]
[29]
 

User List
[81]
 

Syndication