Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-19-2004, 02:22 AM   #1
gafnad
Hungry for insight
 
gafnad's Avatar
 
Join Date: Jan 2003
Location: Mtl, Canada
Posts: 33
Send a message via AIM to gafnad
Default no right clcik and more

Any idea on where i can find a script that allows no right click to save the images that are on an html page and to prevent the user from dragging the image to their desktop?
Thanks in advance
gafnad is offline   Reply With Quote
Old 07-26-2004, 08:50 AM   #2
gecko2
Old Member
 
gecko2's Avatar
 
Join Date: Aug 2001
Location: Hull, Yorkshire, UK
Posts: 8
Default

Here's a bit of Javascript to disable the right click on a page.

<script language=JavaScript>
<!--

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!docume nt.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>
gecko2 is offline   Reply With Quote
Old 07-26-2004, 02:19 PM   #3
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

there is always ways around stuff like that. in fact firefox has an extension available that will ignore this type of javascript (don't know how well it works).
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 07-31-2004, 11:03 AM   #4
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,512
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

Quote:
Originally Posted by tg
there is always ways around stuff like that. in fact firefox has an extension available that will ignore this type of javascript (don't know how well it works).
Ahh, great, could you tell me where??

- Ruben
__________________
.
Originally Posted by MichaelxxOA
"He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit."
Ruben is offline   Reply With Quote
Old 07-31-2004, 12:53 PM   #5
catbert303
member
 
catbert303's Avatar
 
Join Date: Nov 2002
Location: uk
Posts: 428
Default

I'm not sure about firefox but in opera 7.5 you can go to

tools > preferences (alt + p)

then select multimedia and click the javascript options and make sure "allow script to receive right clicks" is unchecked (it should be by default)
catbert303 is offline   Reply With Quote
Old 07-31-2004, 07:43 PM   #6
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,106
Default

you'll need to go to the firefox extension page, download and install the extension. not sure how well it works... not seen anything out there worth stealing.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 08-01-2004, 10:34 AM   #7
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,512
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

Thanks tg and catbert303, I'll look into it, someday, maybe (maybe not )

- Ruben
__________________
.
Originally Posted by MichaelxxOA
"He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit."
Ruben is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:01 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.