...

View Full Version : Can I load images into a target frame using JS?



flashlightbulb
05-29-2006, 05:15 PM
Hello there,

I have included a simple photo gallery in the website I am building, and the gallery pages consist of 3 frames as follows:

Left frame = a Menu with thumbnail images
Top right frame = the Gallery Title
Bottom right frame = the "picture frame" in which I want a full-sized image to load when the corresponding thumbnail image is clicked.

Using HTML, all of my images load into the target frame ("picture frame") when the thumbnails are clicked, but the images aren't positioned correctly (centered). Also, after an image has loaded, it has a lot of white-space surrounding it -- which is a problem since all of my pages have black backgrounds. An example is attached to my post.

I have tried everything, but I have not had any success using html to fix the problem. Is there a JS that I can use to call images into the target frame and have them centered with a black background? Maybe I could use the onload event handler...? If so, I need the correct code, since I am just now learning how to use JS.

Any advice would be much appreciated!

Thanks,

Richard

vwphillips
05-29-2006, 07:50 PM
a link to the frameset would be better

flashlightbulb
05-30-2006, 11:00 PM
Thanks for the input.

I'm not sure that I understand exactly what you mean. A link to the frameset would be better than using the onload event handler? Would linking to the frameset allow me to force an image to load into the target frame centered with a black background?

vwphillips
05-30-2006, 11:06 PM
a link to your code not a pic

flashlightbulb
05-31-2006, 12:14 AM
Okay thanks. Where would I put the link to the script? And what script would I need to use?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum