|
|
auto adjusting popup window?
|
|
|
|
Forum Regular
Join Date: Jan 2004
Status:
Offline
|
|
Hi all,
I'm busy working on a portfolio site. It contains 100's of images, most with different sizes. I've designed a popup ( http://www.b3design.ch/fire+ice/popup.htm ). I would like that this window pops up when a thumbnail is clicked and shows the user the larger image. However, I would like a few things:
1.) The window should only be as big as the image+description, i.e: each thumbnail would have to have a custom popup size assigned to it.
2.) I would like the window to be named according to what image is showing...
Now the problem I have is the fact that I have so many images I don't want to/can't make a seperate popup document for each image. Is there a way I could have the same file which just dynamically updates itself in size, aswell as content when the user clicks a thumbnail?
I hope that made sense
Thanks for any help
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Yeah, it makes sense, I did this exact same thing once
I did it by having one page which was my container and I passed everything to it via the URL. You'd check to see if the window was present, and create it if not.
Each thumbnail is in an <a> with associated href, so that those people without javascript enabled can still see the full images, just not in a fancy pop-up window. If the description is the images alt attribute then this will save even more time... You then don't need to clutter your markup and can just add event listeners and handle everything from script. It also degrades rather nicely for the small percentage of people without javascript enabled.)
What else? Oh yeah. Have location.replace('popuppage.html?img='+e.href); so they don't press back in your new window... Make it focus the popup window if it was blurred. Um. The popuppage would have an onload event which would handle resizing it to the correct dimensions and adding the description.
Now, I apologise for the long-winded and rambling description above of one way you could tackle this problem. If you would like, I'd be happy to help actually do this with you, since I've got quite a bit of free time at the moment
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2004
Status:
Offline
|
|
Hey Black Book,
Thanks for the reply, good to see that someone understands me
Since I'm a graphic designer, and a dreamweaver only webdesigner I got lost about half way...
But, I would love it if you helped me do this, pretty confident it can be done, even by me
Thanks again
P.S: the page with the thumbs is: http://www.b3design.ch/fire+ice/misc.htm (one of many anyway!)
(
Last edited by Pix0r; Sep 9, 2004 at 09:33 AM.
)
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2004
Status:
Offline
|
|
Still there?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|