2 questions website creation Dreamweaver4

  caast©? 22:11 11 Dec 2003

I have created a website in Dreamweaver which opens a thumb nail in a pop up window. which was straight forward. I now need a piece of code that stops the right click, can any one please tell me where I can get this? I seem to remember downloading some, some time ago but after a couple of re-install's I appear to have lost it.

Also can I apply the code to the pop-up window to stop the image being saved, (in Dreamweaver as another behaviour,)and if so how do I do this? M

  PurplePenny 23:00 11 Dec 2003

click here

but I've seen several of these scripts and they don't always work (I've not found one yet that works on Opera).


  caast©? 23:17 11 Dec 2003

Thanks will be giving it a try, Although while I have been waiting for a response to the thread I think I may have found a java script that is not quite so convoluted.

The next thing is to try and use it in Dreamweaver.

Will get back if I have found a solution, maybe I will be able to share it with all you good people, (I try to think of you all as friends)This is such a helpful friendly forum, there is always someone out there willing to help us all out, if only the world could take lessons on how to be so caring and considerate to one another

  nyleridedog 23:34 11 Dec 2003

Is it ruled out completely that dreamweaver does not have this option?

Im sure i seen it somewhere in their!


  Eastender 23:58 11 Dec 2003

Try this one:-

<script language="JavaScript"><!--
function click() {
if (event.button==2) {
alert('Merry Christmas')
// -->

  caast©? 00:15 12 Dec 2003

Cheers this is very similar to the script I tried

However it pops up the message when you click on the thumbnail image. and not on the displaying image, which I do not want anyone to just right click and use save image as option.

I have the thumbs displaying on the page and have attached the behaviour, "open browser window" that then displays the image in a pop up window the size of the Image, e.g. 400 x 500 pixels.

I am looking to stop the right click by displaying the scipt instead of the usual options on that pop up browser window.

The script works fine if the image displays as a new page, I have done this before, but I need to apply it to the individual pop up browser windows M

  Taran 12:07 12 Dec 2003

Perhaps you could post how you are calling the pop up image window to begin with.

If you are using a Java hook to call the image (which I suspect you are) then each image should have its own HTML page that it lives on. All the Java hook does is call the page at a size, position on the screen and with or without borders and toolbars and so on.

So what you need to do is embed the image protection code into the parent page the image actually lives on.

Say you have a page with your thumbnails on called, for arguments sake, gallery.html

Say you have a gallery of 10 thumnails named thumb1 through to thumb10.

Say you click on thumb1. This should call up thumb1page.html (again, using the document name for the sake of argument). It is this page that needs to protection code embedded into it, as do all the other pages that have one of the display images on.

Come back with details of how you are calling the images and we'll go from there, but as Penny has already pointed out, manhy of the scripts do not work or are only partially effective.

I get around things by playing with image size, resolution and so on to give an end result that looks good at the display size on a web page, but that degrades horribly when printed or enlarged.

These scripts atre little more than a deterrent to the casual browser and are dead easy to get around, so I never bother with them at all.


  caast©? 13:54 12 Dec 2003

The layout of my site is as you suggest.

However as it was constructed in Dreamweaver4 their is no need to save images as html documents and resize the document window. This is done by adding a behaviour "open browser window" this allows you to call on the image you wish to display in the window, so it is just a case of pointing to the folder that contains the image and then resizing the window adding scroll bars if you require,tool bars,resize handles what ever you wish. When you test everthing works great, click on the thumb, and up pops the window displaying the image just as you require, at the exact size, everything.

I did originally save some of the images as seperate html documents (10) believing it would be the only way to add java to stop the image being downloaded, but discarded them when I realised Dreamweaver did the trick with the behaviour/event option.

All of the images have a watermark which would make it difficult to alter but obviously anyone wishing to do so, could.

One of my biggest problems is that the site will contain my artwork which is quite extensive and the galleries are growing with upto 40 images in each gallery. Your comment regarding degrading the images seems a reliable solution without having to create 100's of html documents and I would be interested in learning more about this, as if there is a market for selling my pictures I want to consider that, and therefore I am reluctant to give them away for free.

Any help would be greatly appreciated,

p.s. I did not post to the thread singing your praises as I did not wish to add to the embarrasment you obviously felt, however when I posted this thread last night, I was wondering if the great Taran was out there, so here is a personal thank you for the help you give to all of us here in the forum. Your response to my thread is My prayers have been answered. M

  Taran 15:02 12 Dec 2003

Well, I'd say your choices are limited and more so since you are using the Open Browser Window behaviour.

The larger image galleries I prepare tend to call the images from a database or protected folder archive via PHP.

The smaller galleries run in a similar way to yours, with one exception: I still create an individual HTML document for each image to live on and use the Open Browser Window behaviour to call the document rather than the image.

Calling the image is quick and easy, but you are not only limited for the protection you can place on the image file, there are several other options that the HTML document has to it that the image, on its own, does not.

If you set the Open Browser Window behaviour to call a web document with an image, you can still set the size of the displayed file, but the HTML of the underlying document can be used for all kinds of nice things. You can include the "no right click" code for a start. You can also place a transparent GIF over the top of your image by using the HTML, so that even those browsers that are not subject to the "no right click" snippet will not be bale to directly save your image. Instead, they will be saving a transparent layer on top of the image itself.

You can also add a no-cache instruction into the page code, preventing the page from being cached by the browser. This is included in the metatags, but you need to include a few to get it to work properly because of buggy browser software.

For IE (current versions)

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

For (IE version 5)


You should put them in that order between the <head></head> tags of your page.

Include this in your document <body> tag to help prevent Netscape caching:

onLoad="if ('Navigator' == navigator.appName) document.forms[0].reset();"

This is not 100% effective, especially for Netscape, but it can all help.

At the end of the day, all of the above still does not prevent someone from taking a screengrab of your image when they view it.

Protecting images is a sticky wicket at best and even when you combine the above (and other) methods, you still cannot prevent it 100%.

I've seen some impressive 3rd party software solutions that claimed to offer image protection. Some of them even worked, and one or two even worked quite well.

I'd suggest that you experiment with image size and resolution when exporting them for the web coupled with one or more embedded watermarks.

Try and settle on one general image size.

I often choose around 400 to 450 pixels high for all gallery images. Width does not matter as much, since landscape and portrait images will scoot along horizontally as and when they wish, but if they are all of the same vertical size it can help in your presentation.

If you export the files resized to that height and play with selective degrading using the JPG format you can come up with something that looks clean on the web and prints quite well at its displayed size. The moment you try to enlarge the image though, it turns to a load of pixellated and fractured garbage onscreen and in print.

I tend to use Pain Shop Pro or the excellent Ulead PhotoImpact for most of my imaging and both of these can come up with the goods for this kind of thing. How far you take it depends on the resolution you scan at or your camera (if you use one) and its standard file output.

I'm afraid I can't think of a simple solution if you are dead set on calling the image files using the Open Browser Window behaviour, and all of the methods discussed are only partially effective anyway. Perhaps someone else may suggest something of more use in this case.

About the only real method of image protection that tends to work fairly well requires you to reconfigure your web server settings and most hosts will refuse outright to let you loose on the config files for Apache or IIS.



  Taran 15:04 12 Dec 2003

The above assumes that you are indeed using plain vanilla HTML and not ASP or PHP.

If you are using one of the dynamic languages we can bounce a few more possible ideas around.


  caast©? 17:19 12 Dec 2003

Thank very much, sorry for the delay I had to nip out as I am on call.

You certainly have left me much to think about, I have constructed my other websites using plain old html with htmlwriter a nice little progam I was able to download from the web although it now seems to be obsolete software. It has served me well for a few years, and has an option to view the page before posting.

However since purchasing Dreamweaver I tend to use it more and more as it is much easier to add and place layers, frames, navigation bars etc. I had ago with Frontpage but could never seem to get my head around it even after purchasing publications on it.

I thought I was quite good at creating websites, obviously there is a lot more to it than I assumed, but in saying that the more you do the more you learn, knowledge is born out of experience.

Do you suggest that I now create individual html image pages, and add the suggested code? and point the thumbs to the url of the image page.

Will this create a larger site? which seems to be getting bigger and bigger.

I have 50meg with oneandone but the site is creeping up to that as I have upto 500 pictures that I could display.

I have resized them all in PaintShop Pro to anywhere around say 45 to 90kb between 450 x 600 pixels. do I need to get this down even further?

Can I do this without making them display in ther browser window too small? M

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

Turn a photo into 16-bit pixel art

iMac Pro release date, UK price & specs

Football : comment regarder la Ligue 1 en direct ?