Locking Images in HTML Files..can use it on ROR also

I was looking for this locking procedure. and found out the below code
works like no one can click on the image and save it other than
printscreen. this is best when a high resolution background image is
being used.

<html>
<head>
<script language="JavaScript1.2">

//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script

function disableselect(e){

return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
</head>

<img
src="http://www.missouriplants.com/Yellowopp/Helianthus_divaricatus_flowers.jpg"
width="140" height="140" >
<br>
<br>
<a href="http://www.google.com">Google</a>
<html>

Is there a *question* here? In any case, you're deluding yourself if
you think a solution like this is somehow "locking" your page -
getting around this lock is trivially easy in most modern browsers.

--Matt Jones

Jeffrey Bonson wrote:

I was looking for this locking procedure. and found out the below code
works like no one can click on the image and save it other than
printscreen. this is best when a high resolution background image is
being used.

For what it's worth, disabling mousedown events in JavaScript is an
extremely weak means of protecting anything, especially downloads of
images. The method can be defeated entirely by disabling JavaScript in
the browser preferences.

Even if JavaScript is not disabled your HTML source still exposes the
public URI of the image. Using "View Source" then finding the <img> tag
and copying the "src" URI into the browser address bar also defeats any
protection JavaScript may attempt.

However.

If you have the skills or the money to buy them then you do have the
same option as Flickr. Display your images from within a Flash app.
This means that the source url for the image is harder to find - only
harder mind you, wireshark or other similar tools will let you see
this.

But to be honest if you are putting images up on the web then someone
will be able to work out a way of downloading them.

The only solution to this that I can think of is perhaps having users
log on to see the images and showing each user a customised image with
a watermark that allows them to be identified when the image appears
in the wild. Lot of processing to do that thought. But this does not
stop people downloading them it just gives you someone to threaten
with lawyers if the images appear somewhere else (and of course you
have to start scanning the internet to see if your images have cropped
up anywhere).

Does this all sound expensive and not very effective?

Thank you all,for your VALUABLE information.
I didn't find what i needed in this forum and many newbies are using
this as a reference. That's why i posted this. Why don't u guys prove
what u have written with some CODES, so that it becomes useful to OTHERS
as well.

Peter Hickman wrote:

You never actually asked a question, which may be why you did not get
much help. You showed some html and javascript and described what it
achieves. Rails can of course generate any html and javascript that
you like.

Perhaps you should start again and explain what it is that you want to know.

Colin

What exactly are you expecting to accomplish by flaming the list?

Regarding your need for C0DEZZZZZ!!1!one!!eleven!!!!: Uninformed devs
like you have been trying this "IM IN UR WEBPAGE DISABLING RITECLICK"
routine since back in the days of Geocities. Guess what? It didn't
even work *then*. Would you like me to make a screencast that
demonstrates how to disable JS in the browser to "prove" this?

--Matt Jones