View Full Version : Is it possible to add anti right click to this script somehow?
Ghost Rider
04-19-2003, 09:14 AM
I was tinkering with this script http://www.javascriptkit.com/script/script2/popimage2.shtml
and I was curious if it were possible to add an anti right click feature to the popup window that is generated.
Ive tried a few ideas but no luck.
I doubt it can be done but I am curious.
Thanks in advance and please no lectures about how the no right click can be beaten. Ive heard them all. This is more of a curiosity then anything else
smeagol
04-19-2003, 03:38 PM
You can do this....I tried it and it worked.
Put the No Right Click code in a .js file named norightclick.js. Then use the following code in place of the Popup Image Viewer code:
<script>
/*
Pop up image viewer script II
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
function popimage(imagesrc,winwidth,winheight){
var look='width='+winwidth+',height='+winheight+','
popwin=window.open("","",look)
popwin.document.open()
popwin.document.write('<script language="JavaScript" src="norightclick.js"></' + 'script><title>Image Window</title><body><img src="'+imagesrc+'"></body>')
popwin.document.close()
}
</script>
Make your links just like the Popup Image Viewer script tells you to.
This worked for me, and should work for you.
Ghost Rider
04-19-2003, 10:24 PM
Doestn seem to be working. Is there a site with this setup already somewhere that I can look at?
smeagol
04-21-2003, 12:54 PM
Sorry, I should have done that to begin with. I'll post it some time today and post the link in this forum thread.
smeagol
04-25-2003, 12:54 PM
Tell you what....
I've attached the pages and the JS code along with an image to test the pages with. Open these up and look at what has been done to make it work.
Sorry for taking so long to get back to you.
Ghost Rider
04-25-2003, 10:30 PM
Many thanks! I see now the error I made!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.