Posted: July 1st, 2010 By: Devin Walker
Using JavaScript you can have images print when clicked on. What this script will do for you is open whatever image is specified in the JavaScript in a new browser window along with the Print options window.
This method is useful if you are looking for a way to have either a print button for a specific image on a page. Please refer to the demo to see exactly how this can be accomplished. Remember to specify the image's width and height in the JavaScript onClick event.
<img src="http://www.dlocc.com/articles/wp-content/uploads/2010/07/fluffy-kitten.jpg" alt="Print this Fluffy Kitten by Clicking Below" />
<a href="#" onclick='javascript:window.open("http://www.dlocc.com/articles/wp-content/uploads/2010/07/fluffy-kitten.jpg","mywindow","width=322,height=323,left=650,top=-1"); location.href="javascript:window.print()"'>Click to Print the Image Above</a>
If you want to see the demo please click through and we'll show you how to use JavaScript to print images by clicking a link.
Demo JavaScript Print Image Button:
Click to Print the Image Above
Related posts:
- Make Rounded Image, Photo and Graphic Corners in Photoshop The Internet fell into an obsession with rounded corners for awhile and you want to know to how create them? Ok, so first you'll need a graphic, image or photo that needs some rounded corners. Next follow along with this tutorial on how to create rounded corners for images, graphics and photos and you'll be [...]...
- JavaScript Email Address Validation JavaScript makes it easy to validate form fields such as the commonly used email address field. For web designers trying to validate the email field, this simple script provided by Smart Webby works great. I thought I'd pass this along, it can be used to easily validate the email field of your contact, comment, etc. [...]...
-
Richard
-
http://guii.com.uy Nacho
-
M Burke
-
jap
-
http:/www.dlocc.com Devin Walker
-
Kaspalog
-
http://www.wordimpressed.com Devin Walker
-
ir3t






