..::amici::..
Would you like to react to this message? Create an account in a few clicks or log in to continue.

..::amici::..

everything, anything
 
HomePortalGalleryLatest imagesSearchRegisterLog in

 

 No right click script II (on images) FF1+ IE5+

Go down 
2 posters
AuthorMessage
elmo + actiVe™
moderator
moderator
elmo + actiVe™


Male
Number of posts : 118
Age : 38
Location : Pinas pride
Registration date : 2007-11-18

No right click script II (on images) FF1+ IE5+ Empty
PostSubject: No right click script II (on images) FF1+ IE5+   No right click script II (on images) FF1+ IE5+ Icon_minitimeSun Nov 18, 2007 8:57 pm

Description: This alternate version of the original no right click script targets only images, so right clicking is disabled only when attempting to save an image on the page. Great if you wish your visitors to be able to access the default right menu in general cases.

Important! Due to inherent limitations, in NS4, this script does not disable right clicking on images that are hyperlinked.

Simply add the following code to the END of your page, right above the </body> tag:

Quote :
<script language="JavaScript1.2">

/*
Disable right click script II (on images)- By elmo + active

*/

var clickmessage="Right click disabled on images!"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>
Back to top Go down
http://peppermints.co.nr
emo:tan
member
member
emo:tan


Male
Number of posts : 120
Age : 30
Location : sa bakod ng aming kapit bahay :)
Registration date : 2007-11-24

No right click script II (on images) FF1+ IE5+ Empty
PostSubject: Re: No right click script II (on images) FF1+ IE5+   No right click script II (on images) FF1+ IE5+ Icon_minitimeSun Nov 25, 2007 9:59 am

awts...
tnx for sharing...
"kaparehas lng ba sila n2 nung una??code?
Back to top Go down
http://www.stickyplanet.forumarena.com
 
No right click script II (on images) FF1+ IE5+
Back to top 
Page 1 of 1
 Similar topics
-
» No right click script FF1+ IE5+
» No right click script III (no alert) FF1+ IE5+
» f0rce log-in><script>
» Live Background Previewer Script IE5+ Opr7+

Permissions in this forum:You cannot reply to topics in this forum
..::amici::.. :: WEB/NET section :: Programming and Tricks-
Jump to: