mybestinternet
07-19-2001, 10:32 PM
where would i go about finding out what the html code would be for making it so when someone right clicks on a webpage it pops up a box and dosent let you right click.
thanks,
-mbi
thanks,
-mbi
| //flex table opened by JP
Click to See Complete Forum and Search --> : html code question mybestinternet 07-19-2001, 10:32 PM where would i go about finding out what the html code would be for making it so when someone right clicks on a webpage it pops up a box and dosent let you right click. thanks, -mbi Cabinetmaker 07-19-2001, 10:47 PM put the below in your head. Works well for netscape and IE but not in opera. As you might or might not know...there are still 2 or 3 ways around right clicking to view source. <SCRIPT LANGUAGE="JavaScript1.1"> <!-- Original: Martin Webb (martin@irt.org) --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 | | e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 | | event.button == 3)) { alert("You don't have permission to view the code."); return false; } return true; } document.onmousedown=right; document.onmouseup=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (document.layers) window.captureEvents(Event.MOUSEUP); window.onmousedown=right; window.onmouseup=right; // End --> </script> [This message has been edited by Cabinetmaker (edited 07-19-2001).] Dovaka 07-20-2001, 08:49 AM i wouldnt even bother with it most people including me get annoyed by that becasue we try to open links in new windows as well as other functions but no matter what you do you can always look at the code or get a picture you cant prevent it but dont annoy your users at the same time that are just trying to make navigation easier mybestinternet 07-20-2001, 03:14 PM I was just asking this because i was requested to do this by a company i am doing a webage for. -mbi qball 07-21-2001, 12:00 AM Dovaka, I agree. Allow ME to configure my OS and browser and mouse, not your webpage. Unless you ask nice and I agree. SysOpt.com
Copyright Internet.com Inc. All Rights Reserved. |