Time [GMT -4] : 07 Sep , 18:22:23
|
Web site Home
|
Blog Home
26 Sep 2007
02:42:55 pm
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 :
September 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
•
Accessibility
[11]
•
CSS
[15]
•
Developer Tools
[29]
•
Events
[2]
•
Fonts
[3]
•
General
[10]
•
PS Videos
[2]
•
RSS
[2]
•
Search Tools
[2]
•
Templates
[5]
Recent
•
SQL to Select a random row from a database table
•
Accessibility Tools
•
Accessibility Tidbit #1
•
Image Popups with a Caption - Part 3
•
Eye Tracking Lessons
•
Image Popups with a Caption - Part 2
•
Image Popups with a Caption - ASP
•
Why Opera mini fails
•
Note to self - Firefox interprets nested tags weirdly or...
•
Javascript a Print Button to Print
Archives
•
January 2008
[2]
•
November 2007
[5]
•
October 2007
[1]
•
September 2007
[3]
•
August 2007
[5]
•
July 2007
[2]
•
June 2007
[4]
•
May 2007
[2]
•
April 2007
[28]
•
March 2007
[29]
User List
•
calamity007
[81]
Syndication