Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Unable to view source

Reply
Thread Tools

Unable to view source

 
 
Otuatail
Guest
Posts: n/a
 
      12-18-2003
Can anyone tell me what code I use so that when someone right clicks on
a web page youi get the Whats this message instead of a popup window
for view source or save image.

Paul

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      12-18-2003

"Otuatail" <> wrote in message
news:...
> Can anyone tell me what code I use so that when someone right clicks on
> a web page youi get the Whats this message instead of a popup window
> for view source or save image.


What if I want to right click and use the context menu to bookmark your
page? You have just lost me as a return visitor.

It's easy to inhibit right click and **** off you visitors. However anybody
who wants to look at your source has at their disposal about 8 other ways of
getting to it.

Oh, by the way, there is this rule: The desire to hide your source code from
anybody else is in inverse proportion to the value of that code to anybody
else.

Finally, did it ever occur to you to search the history of this newsgoup?
This question comes up at least once a week and gives us lots of fun... Let
the flames begin.

Cheers
Richard.


 
Reply With Quote
 
 
 
 
Chris Harris
Guest
Posts: n/a
 
      12-18-2003
> Can anyone tell me what code I use so that when someone right clicks on
> a web page youi get the Whats this message instead of a popup window
> for view source or save image.
>
> Paul
>


You can't do it.

Your first stop for this type of question should be the FAQ sites
http://www.allmyfaqs.com/faq.pl?Prot...m_being_stolen
http://htmlhelp.com/faq/html/publish.html#hide-source

And many more

Chris
http://www.viking-house.com


 
Reply With Quote
 
PeterMcC
Guest
Posts: n/a
 
      12-18-2003
Otuatail wrote:
> Can anyone tell me what code I use so that when someone right clicks
> on a web page youi get the Whats this message instead of a popup
> window for view source or save image.


It's a waste of time - anyone who has the ability to use copied source has
the ability to get round the no-right-click script. If it's JavaScript code
that you're after, all anyone has to do is switch off js.

By the time a browser is displaying the page, the source is in the cache of
the visitor's computer and, once it's there, it's always going to be a
simple task to look at it - and the same with images.

Your site may be the exception to the rule but, in my experience, the more
someone tries to hide their code, the less it is worth stealing. The major
sites - which have cost hundreds of thousands to develop - don't use
no-right-click scripts and they have a far greater investment to protect.

If you really must have a script, there are 2,000,000+ pages referenced at:
http://www.google.com/search?q=right+click+script

Or you could let others explain the problem more eloquently than I by having
a look at:
http://www.allmyfaqs.com/faq.pl?Hide_source

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

 
Reply With Quote
 
Trevor George
Guest
Posts: n/a
 
      12-18-2003
Otuatail wrote in message ...
> Can anyone tell me what code I use so that when someone right clicks on
> a web page youi get the Whats this message


I used this javascript below on one of my 'hobby' sites as lots of people
were 'Hotlinking' to the images in message-forums.

It's not perfect but it's cured the 'Hotlinking' problem. It's only placed on
the "Enlarged images" pages if you want to try it here at ...
http://www.Gilera-Nexus.co.uk - Just alter the text to suit your own
requirements.


<script type="text/javascript">
<!--
var ErrMsg = "Please do not 'Hotlink' to these images";
function disableRightClick (btnClick)
{
if (navigator.appName == "Netscape" && btnClick.which == 3)
{
alert(ErrMsg);
return false;
}
else if (navigator.appName == "Microsoft Internet Explorer" && event.button
== 2)
{
alert(ErrMsg);
return false;
}
}
document.onmousedown = disableRightClick;
-->
</script>

Cheers ..... Trevor, Bristol, UK. http://www.OnMyWindow.co.uk


 
Reply With Quote
 
PeterMcC
Guest
Posts: n/a
 
      12-18-2003
Trevor George wrote:
> Otuatail wrote in message ...
>> Can anyone tell me what code I use so that when someone right clicks
>> on a web page youi get the Whats this message

>
> I used this javascript below on one of my 'hobby' sites as lots of
> people were 'Hotlinking' to the images in message-forums.
>
> It's not perfect but it's cured the 'Hotlinking' problem. It's only
> placed on the "Enlarged images" pages if you want to try it here at
> ... http://www.Gilera-Nexus.co.uk - Just alter the text to suit
> your own requirements.
>
>
> <script type="text/javascript">
> <!--
> var ErrMsg = "Please do not 'Hotlink' to these images";
> function disableRightClick (btnClick)
> {
> if (navigator.appName == "Netscape" && btnClick.which == 3)
> {
> alert(ErrMsg);
> return false;
> }
> else if (navigator.appName == "Microsoft Internet Explorer" &&
> event.button == 2)
> {
> alert(ErrMsg);
> return false;
> }
> }
> document.onmousedown = disableRightClick;
> -->
> </script>
>
> Cheers ..... Trevor, Bristol, UK. http://www.OnMyWindow.co.uk


I agree with you about the problem of hot-linking but I'm afraid that the
above doesn't stop it. The script makes it marginally harder to find the
file name for the image - one has to simply switch off js - but it doesn't
actually affect hot-linking. That has to be done at the server.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

 
Reply With Quote
 
Trevor George
Guest
Posts: n/a
 
      12-18-2003
PeterMcC wrote in message ...
> I agree with you about the problem of hot-linking
> but I'm afraid that the above doesn't stop it.


Obviously the folks who were 'hotlinking' didn't have quite the
*intelligence* that the regulars on this group have !! (or else they felt
sorry for me).

> but it doesn't
> actually affect hot-linking. That has to be done at the server.


I realise that, but it was just a quick option when I realised the drain on
my bandwidth was occurring.

--
Cheers ..... Trevor, Bristol, UK. http://www.OnMyWindow.co.uk




 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      12-18-2003
rf wrote:
>
> "Otuatail" <> wrote in message
> news:...
> > Can anyone tell me what code I use so that when someone right clicks on
> > a web page youi get the Whats this message instead of a popup window
> > for view source or save image.

>
> What if I want to right click and use the context menu to bookmark your
> page? You have just lost me as a return visitor.



Or the thing I use a lot since getting Mozilla, Open Link in New Tab.
Tabbed browsing is great, so it eally ****es me when someone monkeys
with the right click.




Brian Rodenborn
 
Reply With Quote
 
Whitecrest
Guest
Posts: n/a
 
      12-18-2003
In article <xngEb.57224$>,
says...
> What if I want to right click and use the context menu to bookmark your
> page? You have just lost me as a return visitor.


I always look at this (and similar issue) like the "no shirt no shoes,
no service" signs.

It's not that I don't want you business, I just want you to do it my
way. If you don't want to do it my way then fine, don't come in.

At a store on the boardwalk of a beach, you would be silly to have that
sign. At a fine restaurant you would be silly to not have it.
Different things work for different sites.

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
Whitecrest
Guest
Posts: n/a
 
      12-18-2003
In article <xngEb.57224$>,
says...
> What if I want to right click and use the context menu to bookmark your
> page? You have just lost me as a return visitor.


Aside from my previous post, in this case, I completely agree with you.
He is likely to **** off visitors tat try to right click on the page.

> Oh, by the way, there is this rule: The desire to hide your source code from
> anybody else is in inverse proportion to the value of that code to anybody
> else.


Right on the money


> Finally, did it ever occur to you to search the history of this newsgoup?
> This question comes up at least once a week and gives us lots of fun... Let
> the flames begin.


See my previous post....... ;-}

--
Whitecrest Entertainment
www.whitecrestent.com
 
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
Updates in Design view not moved to Source view andspal ASP .Net Web Controls 0 11-02-2006 08:13 AM
how do i edit source (like in IE, view..source)? q_q_anonymous@yahoo.co.uk Firefox 4 05-13-2006 11:07 PM
Unable to use the dropdown menu, View>Source in Internet Explorer. TC Computer Support 9 10-28-2005 12:03 PM
can't use View, Source menu to open the source code. Jenny Javascript 3 12-17-2004 07:01 AM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi ASP .Net Web Controls 1 07-06-2004 03:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57