I think he's actually asking for a way to CLOSE the opened window. You can use the "self.close()" method in the opened window. I would not tie that to the click method of the displayed image, however. Display a "close me" button, instead.
In actuality, though, this is completely unnecessary. Everyone understands how to close an open window; there is no need to code an extraneous control.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Wrap the img tag in the new window with an anchor declaration. Code the onclick handler for the anchor, using self.close:
<a href="javascript:self.close();"><img src="http://www.tgreer.com/tgroup.png"></a>
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Make sure you do your testing from a web server, as opposed to local files.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37