Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > 2 newbie questions

Reply
Thread Tools

2 newbie questions

 
 
JimO
Guest
Posts: n/a
 
      11-27-2004
Two questions:
1) Is there a way to keep someone from viewing the source code of a page?

2) Is there a way to keep someone from copying content from a page?

Thanks,
Jim


 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      11-27-2004
JimO wrote:

> Two questions:
> 1) Is there a way to keep someone from viewing the source code of a page?


No.

> 2) Is there a way to keep someone from copying content from a page?


No.

> Thanks,


Welcome.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
 
 
 
Philip
Guest
Posts: n/a
 
      11-27-2004
In JavaScript, no to both questions.
The problem is that the code is client-side, and so has to be
downloaded with the HTML and then interpreted.

In any server-side language the code will be hidden, like ASP, Perl
etc...

You can't stop the viewer doing a 'View Source'. To be quite honest
looking at other people's code and seeing how they do things is quite
instructive, so perhaps we can all be pleased that we can see other
people's code; but, if only they couldn't see mine, that would be a
good addition to any browser!


"JimO" <joneill517###NOSPAM###@earthlink.net> wrote in message news:<8tUpd.4736$(E-Mail Removed) link.net>...
> Two questions:
> 1) Is there a way to keep someone from viewing the source code of a page?
>
> 2) Is there a way to keep someone from copying content from a page?
>
> Thanks,
> Jim

 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      12-03-2004
koethler wrote:
> You can disable the right mouse button this way ...


How does disabling the right mouse button using JavaScript have anything
to do with either of the OP's question?

Disabling the right button does not stop me either viewing the source
or copying the content. Sometimes the mouse I use does not even have
a right button.

--
Rob
 
Reply With Quote
 
Ivo
Guest
Posts: n/a
 
      12-14-2004
"koethler" wrote
> You can disable the right mouse button this way by putting the

<snip>
> Hope this has been helpfull.


Quite the opposite. Encouraging people to remove a very fundamental tool,
the contextmenu, from the browser is counter-productive for a number of
reasons. You have no idea how basic and important it is for some people.
Besides, everything that can be done from the contextmenu, can also be done
in some other way, so disabling it merely makes it more cumbersome to do it.
You also didn't cancel the Shift + F10 shortcut key.

Here is a bookmarklet to re-enable the contextmenu on any page that suffers
from an anti-right-click-script, even in frames:

javascriptfunction(w){for(var%20i=0;i<w.length;i ++){arguments.callee(w.fra
mes[i]);}try{function%20n(r){r.onclick=r.oncontextmenu=r .onmousedown=r.onmou
seup=null;}n(w.document);n(w.document.body);}catch (e){alert('Bookmarklet%20f
ailed:\n\n'+e.message);}})(top);
--
Ivo
http://4umi.com/web/bookmarklet/rightclick.htm


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie with newbie questions JohnE ASP .Net 3 08-17-2009 10:10 PM
Malloc and free questions - learner questions pkirk25 C Programming 50 10-04-2006 02:22 PM
Questions on Canon 300D and etc. questions regarding digital photography Progressiveabsolution Digital Photography 12 03-24-2005 05:18 PM
Newbie questions - Couple of VC++ questions regarding dlls and VB6 Ali Syed C Programming 3 10-13-2004 10:15 PM
Re: Questions....questions....questions Patrick Michael A+ Certification 0 06-16-2004 04:53 PM



Advertisments