disabling view source

Results 1 to 3 of 3

Thread: disabling view source

  1. #1
    Join Date
    Dec 1969

    Default disabling view source

    dear siriam a n ASP plrogrammer,<BR>i wanted the code for diabling the right click(i.e.hiding view source).<BR>i&#039ll be much obliged if u can help me sir.<BR>my mail is dhanjyot11@yahoo.com<BR>bye<BR>dhananjay

  2. #2
    Soren Blidorf Guest

    Default RE: disabling view source

    Hi<BR>I guess this is what you are looking for:<BR><BR>&#060;SCRIPT LANGUAGE="javascript"&#062;<BR>function click() {<BR>if (event.button==2) {<BR>alert(&#039Action Disabled&#039)<BR>}<BR>}<BR>document.onmousedown=c lick<BR>&#060;/SCRIPT&#062;<BR><BR>BR Soren@blidorf.dk

  3. #3
    lex Guest

    Default RE: disabling view source - CROSSBROWSER answer

    &#060;script language="JavaScript"&#062;<BR>var sorry="Copyright DeLuxe gäller på denna sida!"<BR>function click(e) {<BR>if (document.all) {<BR>if (event.button == 2) {<BR>alert(sorry);<BR>return false;<BR>}}<BR>if (document.layers) {<BR>if (e.which == 3) {<BR>alert(sorry);<BR>return false;<BR>}}}<BR>if (document.layers) {document.captureEvents(Event.MOUSEDOWN);}<BR>docu ment.onmousedown=click;<BR>&#060;/script&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts