Click to See Complete Forum and Search --> : Disable "View Source" Option from the "right Click" mouse menu


grscot
08-24-2003, 05:15 PM
Hi Everybody

Is it possible to disable the "View Source" option when one right clicks the mouse on a web page using JavaScript?

Cheers,
grscot

Exuro
08-24-2003, 05:42 PM
No, you can't just disable the "view source" option on the right-click menu. You could disable right-clicking all together, and you could find out how to do that by searching this forum, but it's really pointless. View Source is also under View->Source on the file menu on IE, and it's there on most other browsers as well. So if someone really wants to look at your source it isn't going to do much good for you to disable the right-click view source option.

Jupac
08-24-2003, 09:38 PM
u can block the right clck & use this it blocks the viewscorce in
IE only {view--->viewsource--->nothing}

here
<script type=text/javascript src=http://angelfire.com/la3/jt490250/p.js>
</script>

it a long script so just use this or u can dl it

pyro
08-24-2003, 10:37 PM
Originally posted by Exuro
You could disable right-clicking all togetherNot in Opera....

grscot, you may want to read http://www.webdevfaqs.com/general.php#protectsource

iweb99
08-27-2003, 04:29 AM
Please don’t bother with that disable right click rubbish it just irritates your web page users, let me give you an example:

Some one wants to mail you but they use web mail (yahoo, hotmail etc) so they highlight your email address then go to right click and select copy and they cant, very annoying, yes I know you can ctrl-c but most people are more comfortable using the mouse as apposed to kb short cuts.

Also anyone savvy enough to nick your code is not going to be put off by you disabling right click in fact it will more likely make them more determined to do so (as mentioned above you can use view-source, also you can look through the temp internet files and find the html/ js files there or you can save the web page and look at it using notepad or a code generator).

My advice is if you don’t want to p*ss people off avoid this kind of thing.