Website: Can I link in JavaScript and have the target a cell?

SuepaFly

Senior member
Jun 3, 2001
972
0
0
I'm working on a photo gallery for my webpage and I'm running into major problems. I have this java script for a scrolling window the preview the pictures. What I want is to be able to click on the picture thats in the iframe and have it appear larger (without frames) on another part of the page (possibly a cell). Anyone know how I can do this?
 

ajromero

Junior Member
May 4, 2003
5
0
0
Well you can create an image placeholder in another part of the page and name it, with no source:

<IMG NAME='placeholder' SRC=''>

Then on each of the preview images, you would put onClick=placeholder.src='mylargerimage.jpg' (or whatever). If the placeholder is outside of the IFRAME, make it onClick=parent.placeholder.src=...

I'm no javascript expert, but that's where I'd begin. I think you'd also want to specify length and width attributes either on placeholder or possible in the Javasccript if the larger images are not a standard size.

Good luck,
Aaron
 

SuepaFly

Senior member
Jun 3, 2001
972
0
0
thanks for your help, I switched it to an auto scrolling layer and had the target as a cell... its okay, loops a little slow though. Check it out.
 

manly

Lifer
Jan 25, 2000
11,716
2,666
136
You're a way better web developer than I am, but update your title to say JavaScript. ;)

As for your site, I don't know about the scrolling thumbnails, but I guess it works okay (under Mozilla). The color scheme is a bit wacky though. :p
 

SuepaFly

Senior member
Jun 3, 2001
972
0
0
Originally posted by: manly
You're a way better web developer than I am, but update your title to say JavaScript. ;)

As for your site, I don't know about the scrolling thumbnails, but I guess it works okay (under Mozilla). The color scheme is a bit wacky though. :p

Doh, sorry about the thread title thing.

Yeah I'd prefer to have some mouse over navigation, but I tried that and I'm not cool enough to make the overflow hidden, so it would have been the same as actually scrolling. Plus people got confused with the mouse over scrolling thing.

About the color scheme, I chose them when I was looking through this catalogue that got sent to my apartment accidently and it was some sort of furniture/decor place, had a combo of these colors and I liked it a lot.