Click to See Complete Forum and Search --> : newWindow(): Setting Parameters
ad-hoc
10-26-2003, 01:30 AM
This should be a no-brainer, but I can't come up with the exact parameters that will set the top and left margins of the content in my window.open script.
From an image map, I am opening child windows of full-sized images, and I want the images to fit flush against the top and left margins of their respective windows.
Right now I've set the window height and width parameters greater than the image size to keep the image from getting clipped.
To see what I mean, go to:
http://www.muckner.com/about/MucknerPhotos.html
Thanks for any help!
Lisa
ad-hoc
10-26-2003, 01:47 AM
ALSO -- a much bigger problem with this code is that I don't know how to change the variable in the function for each individual part of the image map that is hyperlinked (I haven't got that far yet, but I can see it coming). With the current script, a new image would be needed for each separate window that opens. But I'm using just one image, as you can see.
Any help would be fabulous.... thanks.
Lisa
Khalid Ali
10-26-2003, 07:38 AM
If I understand you correctly, the link below should help..
http://www.webapplikations.com/pages/html_js/image_examples/OpenThumbnailImageFullSize.html
ad-hoc
10-26-2003, 02:38 PM
In the script you provided, it looks like there are a couple of methods to open windows, but it seems that in both, the "newImg.src" element can only be defined once in the script, per hyperlink. In all the scripts I find, the parent image is encased in <a href> tags, but when using an image map, you can't do that.... you need something with a changeable variable.... I think.
As for the window margins - getting the image to sit flush against the top and left sides fo the window - I tried your 'height="+(newImg.height+2)+"' approach, but it did not get the correct results... I'm still perplexed. I would think it would be something so simple, like 'topmargin=0'.
Thanks... I'll keep trying.
Lisa
ad-hoc
10-26-2003, 04:02 PM
You know what - I figured something out that is working just fine. I've got the whole thing up and running now. So... never mind! Thanks.
Lisa