| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Hungry for insight
|
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 |
|
|
|
|
|
#2 |
|
Old Member
Join Date: Aug 2001
Location: Hull, Yorkshire, UK
Posts: 8
|
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> |
|
|
|
|
|
|
|
|
#3 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
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? |
|
|
|
|
|
#4 | |
|
Me
|
Quote:
__________________
. 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." |
|
|
|
|
|
|
#5 |
|
member
Join Date: Nov 2002
Location: uk
Posts: 428
|
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) |
|
|
|
|
|
#6 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
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? |
|
|
|
|
|
#7 |
|
Me
|
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." |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|