[thelist] onClick(Image.Print())

Rob Smith rob.smith at THERMON.com
Wed Jul 2 09:34:59 CDT 2003

Good morning, afternoon, night,

I'm not quite sure how to accomplish this, but I have an idea and am seeking
a better one. What I wanted to do is have an image and if the user clicks
it, the image would print. much like javascript:window.print().

That won't work since prints the whole page out. I also thought about this:

(the link)
<a href='javascript:openwindowprintthenclose()' title="Click this image to
print it out"><img src="/images/pic/gif"></a>

(the javascript)
function openwindowprintthenclose() {

<body onload="window.print();window.close()">
<img src="/images/pic.gif">

Perhaps you know of a slightly more elegant solution?


More information about the thelist mailing list