Attn Mr.G.WADDELL (preventing users from copying/s

Results 1 to 6 of 6

Thread: Attn Mr.G.WADDELL (preventing users from copying/s

  1. #1
    Nivita Guest

    Default Attn Mr.G.WADDELL (preventing users from copying/s

    Hi,<BR>This is in response to your reply to my query posted on October 5th(How to prevent people from copying contents of a web page). I tried out your code and it did work....but,unfortunately,as it is in VBScript,it fails to work in Netscape.So could u please give me the corresponding code in JavaScript also.Also, can u give me a brief explanation of your code(especially what is this scriptlet?).<BR>----------------<BR>Yes try these two things:<BR>script in the document,<BR>&#060;script language="vbscript"&#062;<BR>sub document_onmousedown()<BR>if (window.event.button=2) then<BR>window.event.returnvalue = false<BR>window.event.cancelbubble=true<BR>end sub<BR><BR>sub document_onselectstart()<BR>window.event.returnval ue = false<BR>window.event.cancelbubble=true<BR>end sub<BR>&#060;/script&#062;<BR><BR>and open your document within a scriptlet:<BR><BR>&#060;object id="Scriptlet1" data ="document URL" width="100%" height="100%" type="text/x-scriptlet"&#062;<BR>&#060;/object&#062;<BR>----------------<BR>I will be really very very grateful to you if you would do this.Regards-Nivita.

  2. #2
    Join Date
    Dec 1969

    Default RE: Attn Mr.G.WADDELL (preventing users from copyi

    Guys, you may as well forget about it. This will NOT WORK.<BR><BR>Even if you trap the right mouse-button, there are still easy ways to view the source.<BR><BR>Sorry.

  3. #3
    G Waddell Guest

    Default Never Said it was fool proof

    I never said it was fool proof, the most determined of user / hacker will always find a way to do what they want but why make it easier for them? <BR><BR>Any way to answer the question I think the Javascript would go something like this:<BR><BR>&#060;script Language="Javascript"&#062;<BR>function disableRightClick(btnClick)<BR>{<BR>if (navigator.appname == "Netscape"&&btnClick.which==3)<BR>{<BR>alert "Naughty Naughty trying to view my source";<BR>return false;<BR>}<BR>Else if (navigator.appName=="Microsoft Internet Explorer" && event.button == 2)<BR>{<BR>alert "Naughty Naughty trying to view my source";<BR>return false;<BR>}<BR>}<BR>document.onmousedown = disableRightClick;<BR>&#060;/script&#062;<BR>DHTML Scriptlets are like include files for clientside script and data that allow the developer to handle them like reusable components.<BR>I know they are supported in IE and would think that Netscape has some sort of equivalent behaviour. <BR>A good book on the subject is: Instant DHTML Scriptlets by Dino Esposito from wrox<BR><BR>

  4. #4
    Shedao Shai Guest

    Default globalHTML

    Hacking client side code for html source? Thats totally far·ci·cal<BR><BR>[root@ftp sniffer]# hi -a<BR>Linux 2.0.32 #1 Mon Sep 09 11:25:50 PDT 1998 i686<BR>unknown<BR><BR><BR>A client doesn&#039t have to execute client side code. It&#039s optional.<BR><BR><BR>

  5. #5
    G Waddell Guest

    Default RE: globalHTML

    What I ment was that no matter what you do there will always be a way around it. E.G. You could buy the most expensive hi-tech car alarm on the market for your car but someone somewhere will given enough time find away to get around it.<BR><BR>Anyway, I was answering a question that asked if there was away to stop a client viewing your source code and as I said in my orginal reply (if any of you would have bothered to read it) that the two methods I showed MAY HELP.

  6. #6
    shedao shai Guest

    Default RE: globalHTML

    I read your original post. <BR><BR>What if everyone hid their source code? Would you ever be able to learn anything from a MS technical reference? <BR><BR><BR>

Posting Permissions

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