Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > auto adjusting popup window?

auto adjusting popup window?
Thread Tools
Pix0r
Forum Regular
Join Date: Jan 2004
Status: Offline
Reply With Quote
Sep 7, 2004, 08:06 PM
 
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
     
Chris O'Brien
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Sep 9, 2004, 05:16 AM
 
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
     
Pix0r  (op)
Forum Regular
Join Date: Jan 2004
Status: Offline
Reply With Quote
Sep 9, 2004, 09:25 AM
 
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. )
     
Pix0r  (op)
Forum Regular
Join Date: Jan 2004
Status: Offline
Reply With Quote
Sep 13, 2004, 09:38 AM
 
Still there?
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:41 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,