Click to See Complete Forum and Search --> : Question on opening new window


haan
09-26-2003, 02:33 AM
In the link http://www.kunsterf.nl/galerijproef2.html I have a thumb size image (small image). If you click on this image a new window opens a larger copy of the image (large image). The final idea is that of a photogallery with all kind of small images which can be enlarged. This works fine but it doesn't look very nice. I have 2 questions:
1. In the bar on the top side of the new window which opens there are the words : "http://www........./.....jpg" (so the path of the image on the site). Is there a way to change this into a title, for example "a ship on the sea" or something like that?
2. The large image is not nicely aligned in the frame of the window which opens, On the left and bottom side there is a margin and on the right hand and top side there is no margin. Is it possible to change this somehow?

Thanks,

Haan

lillu
09-26-2003, 03:36 AM
Of course... you're almost there... :)

onClick="window.open('expositiecrop.jpg','','width=300,height=250');
return false">
<img src="expositiecropopt.jpg" title="" width="100" height="75" border="0"></a>

onClick="window.open('expositiecropopt.jpg','A Ship on the Sea')">

So just insert the image's title inside those '' quotes in the window.open function (second parameter). The text there will appear in the title of the popup image.

Khalid Ali
09-26-2003, 04:23 AM
Originally posted by lillu

So just insert the image's title inside those '' quotes in the window.open function (second parameter). The text there will appear in the title of the popup image.

I am afraid thats not true.The second parameter is the important one,it must not have any invalid characters (such as spaces in this case) in it, as well as its the windows name for browser to distinguish from any other windows.

to set the title of a document you will need to do this for a popup.

var newWin = window.open('expositiecrop.jpg','','width=300,height=250');
newWin.document.title="Dynamically set title"

haan
09-26-2003, 10:08 AM
OK, thanks

Kippie