Guest zethilone Posted July 23, 2003 Posted July 23, 2003 Hey, How do you make it so people cant right click on your website for picture protection? And how can you make it so people cant just view your source. -Thanks -Matt Quote
TCH-JimE Posted July 23, 2003 Posted July 23, 2003 Matt, Blocking the right click is done via javascript, it is however, also very easily overcome. ><script language="javascript"> <!--// function press() {if (event.button==2) { alert('sorry, you cannot do that')}} document.onmousedown=press //--> </script> As noted above this is very very easily overcome and most people dont bother with it any more. Again, source code is not protectable. There are hundreds of websites out there which claim, often for a fee, they will tell you how to stop it. All of these can be bypassed and source code taken, it just depends on how much that person wants it. Sorry to sound so negative! Jim Quote
Digirunt Posted July 23, 2003 Posted July 23, 2003 Theres a new feature in IE that goes ><body oncontextmenu="return false" onselectstart="return false" ondragstart="return false"> Unlike the javascript way that can be bypassed during page load this method can't. But it only works in IE so its use is limited but it stops right click menu Selecting dragging so images can't be dragged into address bar. You can combine it however with the javaScript method without problem thus protecting your page from the majority of internet users. If you put images into a table as a background picture and place a transparent gif over the top that can also help. I've noticed some MS pages that when you click Edit>view source just give an error sound and nothing happens. Not sure how that works though. [i'll look into it.] ??? if you are using frames aswell the edit>view source will only show the source for the parent frame and not the child so obviously a full page I-frame can help but Netscape doesn't work properly with I-frames sized with %ages so it's not the best. however these days I don't bother cos like jimuni says if people want it they'll get it so why try? Sometimes trying to hide something makes people look harder. Whats in your source your worried about? Certain script can be encrypted safely although i've never tried it. Thumbs Up Quote
Digirunt Posted July 23, 2003 Posted July 23, 2003 Sarcastic but true; http://www.vortex-webdesign.com/help/hidesource.htm The MS error sound thing, My browsers been hijacked and is knackered. Hijack this to the rescue. . . I hope. Thumbs Up Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.