I am a beginner with very basic knowledge of Javascript.
Please help me to modify this script. When somebody clicks on the thumbnail to open up the enlarged popup image ( not an html page).
I have seen somewhere where somebody tries to left click on the popup image or right click to save it, the popup closes by it self.
Self close timer won't for me. I tried watermarking for the images. People wipe the watermark and still use them as if their own. :(
[code=javascript]
<!-- ;
var newwindow = ''
function popitup(url) {
if (newwindow.loca tion && !newwindow.clos ed)
{ newwindow.locat ion.href = url; newwindow.focus (); }
else
{ newwindow=windo w.open(url,'htm lname','width=5 00,height=600,r esizable=1') ; }
}
function tidy()
{
if (newwindow.loca tion && !newwindow.clos ed) { newwindow.close (); }
}
// -->
</script>
<a href="javascrip t:popitup('imag e_to_open_in_po pup.jpg')"><img src="image_from _the_html_page. jpg" width="300" height="225" border="0" alt="image_name "></a>[/code]
Please help me to modify this script. When somebody clicks on the thumbnail to open up the enlarged popup image ( not an html page).
I have seen somewhere where somebody tries to left click on the popup image or right click to save it, the popup closes by it self.
Self close timer won't for me. I tried watermarking for the images. People wipe the watermark and still use them as if their own. :(
[code=javascript]
<!-- ;
var newwindow = ''
function popitup(url) {
if (newwindow.loca tion && !newwindow.clos ed)
{ newwindow.locat ion.href = url; newwindow.focus (); }
else
{ newwindow=windo w.open(url,'htm lname','width=5 00,height=600,r esizable=1') ; }
}
function tidy()
{
if (newwindow.loca tion && !newwindow.clos ed) { newwindow.close (); }
}
// -->
</script>
<a href="javascrip t:popitup('imag e_to_open_in_po pup.jpg')"><img src="image_from _the_html_page. jpg" width="300" height="225" border="0" alt="image_name "></a>[/code]
Comment