I've been checking out some websites that have a thumbnail that when you click on it, it calls for a pop up window of the full image of the thumbnail. However, I'm also looking for the code that causes the pop-up window to automatically close when you click on the screen away from the window, like this guy's site here: http://www.bodark.com/archive/2007-04-3 ... den_season
I tried reading the source code but I can't for the life of me identify which part of the code causes the pop-up window automatic close.
This is what I got so far on my local machine:
Between <head></head>:
Code: Select all
<script language="JavaScript">
<!--
function window.open(theURL,winName,features);
//-->
</script>
Code: Select all
<a name="image_name" onClick ="window.open
('image_name.jpg','Const','width=xxx,height=xxx'); return false">
<img class="art"
src="thumb/image_name_thumb.jpg" target="_self"
title="some title">
</a>
If anyone knows how the pop-up can auto close when the mouse is left-clicked when the pointer is off the pop-up window I appreciate the help.
Thanks in advance.