Go Back   Dynamic Drive Forums > General Coding > JavaScript
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-09-2005, 02:52 PM
lms2394 lms2394 is offline
Junior Coders
 
Join Date: Jul 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default pop up window for detail images

Hi,

I have a website I am working on and the client requested pop up windows to show the detail images when clicking on thumbnails. Here is the criteria:

- detail images are different sizes
- I don't want to have a separate .htm file for each detail image
- I want the title bar to display a name I give it, rather than the name of the image
- Each image will have it's own unique caption within the pop up window
- I need a button on the bottom of the window to close
- There are currently 40 thumbnail images, however this number is expected to increase over time which is why I don't want to have separate pages for each detail image

I am not really sure how to go about doing this. I am looking forward to receiving help with this mission

thanks in advance for any and all help

Lisa
Reply With Quote
  #2  
Old 07-09-2005, 06:14 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,134 Times in 1,120 Posts
Blog Entries: 3
Default

I already had something close to that and have, just now been fiddling with it to see if it can match your specifications. Probably but for one thing - 'security' concerns have prompted all the major browsers to disallow a pop up window that doesn't show an address bar, unless the base address is shown in the title bar, If you don't mind an address bar, that's no problem. Even without an address bar, it will show the title, but after the base address. Out of curiosity, why a button on the bottom (I've already made one) to close? All windows have a button at the top to close. Anyways, for pure esthetics, you might prefer:

http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

It can probably be tweaked to your requirements but, is not a true window and, as such, will be limited in certain applications, particularly when launched from inside a frame. Even on a full window page, its pop ups cannot leave the window's borders.

Here's a demo of what I've been working on, using fairly small images which point up some of its limitations, especially in IE. In FF or NS it is better behaved. The caption would be easy to add:

http://home.comcast.net/~jscheuer1/side/opener4.htm
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Last edited by jscheuer1; 07-09-2005 at 06:22 PM.
Reply With Quote
  #3  
Old 07-09-2005, 08:18 PM
lms2394 lms2394 is offline
Junior Coders
 
Join Date: Jul 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks so much for your reply

At this point, I wouldn't mind an address bar. I just like the button in the bottom of the new window because the way it looks. Personally, I think it looks cleaner - just my opinion

I do like the dynamic index 4, and will probably play around with it to see if it would be something that could work for the site I am working on. It is a cool concept - thanks for the link. For some strange reason, my mind is set on the open new window thing. Probably because I am the type of person that knows there is a solution in how to do what I want. It may take me hours of beating my head against the wall - but that would be the "geek" mentality I have.

I tried to view the demo you were working on, but the links on your demo page didn't do anything - could be because I am on a mac and using safari.

thanks again!!!! Back to playing with code.

Lisa
Reply With Quote
  #4  
Old 07-09-2005, 10:19 PM
bubba.daniel bubba.daniel is offline
Junior Coders
 
Join Date: Jul 2005
Location: cali
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, John, that is a very good point, and you are correct lms2394.

Your images are not showing up John. I'm disappointed in you. *scold*
Reply With Quote
  #5  
Old 07-10-2005, 02:10 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,134 Times in 1,120 Posts
Blog Entries: 3
Default

Even though home.comcast.net is a part of my broadband service, they don't provide much bandwidth for the personal pages, especially at 'peak' times on the East Coast of the US, which it has been since I posted the demo and now. In addition, I have no Mac to test on. If you are using IE6 or FF the demo should be fine. On a 'real' site the images will load much faster, even where they are, they will load eventually, if you are patient (for FF, I think it will need a preload function to avoid a pop-up warning on large images, as is, you can just refuse the pop-up and try again, by then the image will be cached). Also, that demo was something I slapped together from files I had lying around, it probably can be tightened up quite a bit. I'd be happy to work with a Mac user to find a way to get it to work on Safari, I've done that before.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #6  
Old 07-10-2005, 12:59 PM
lms2394 lms2394 is offline
Junior Coders
 
Join Date: Jul 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am going to try it on my pc, and I will also see if it works on other mac browsers. Will let you know

In the meantime, must have coffee

Lisa
Reply With Quote
  #7  
Old 07-10-2005, 01:21 PM
lms2394 lms2394 is offline
Junior Coders
 
Join Date: Jul 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I had coffee and feel better

John, your script seems to work in NS 7.2 on mac - although, it opens up a large window and then resizes to a smaller window to accommodate the size of your image. Not sure if that is how it is supposed to work.

Doesn't work on IE 5.2 for mac

It is more along the lines of something I am looking for. I am wondering if there is perhaps a way to write some javascript code and have an xml file define all the larger images. I am sure I am grasping at straws with the xml thing. For me the harder it is to find a solution, the more drive I have to get one.

Lisa
Reply With Quote
  #8  
Old 07-10-2005, 01:48 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,134 Times in 1,120 Posts
Blog Entries: 3
Default

Well, I originally designed this scheme on the supposition that I couldn't be bothered writing tons of code for images. I wanted the browser to do as much work as possible. If we took a different tack and fed the script the images dimensions from the git go, things would be much smoother. Currently it is set to detect the images size. In IE6 this happens the moment you mention an image. In other browsers, they like to cache the image first. That is why in NS7 the window resizes after the image loads. FF's default security won't allow that, nor will it report to us the image' dimensions ahead of time, like IE6, hence, the idea of a preload for FF. Once preloaded, any image capable browser can report an images dimensions. If we have the dimensions ahead of time though, all we need to do is calculate the chrome for our anticipated window (including in this case the caption and button thing), add it all up and we can know ahead of time the window size. I'm off for a bit, get back to you later.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #9  
Old 07-11-2005, 08:04 AM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,134 Times in 1,120 Posts
Blog Entries: 3
Default

OK, I've upgraded the demo, it is still located at the same Link
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #10  
Old 07-13-2005, 04:10 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,134 Times in 1,120 Posts
Blog Entries: 3
Default

OK, I've gotten fed up with the bandwidth at my ISP's free personal web pages and have put the demo Here. It is an ad supported site but at least it loads fairly fast.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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

Forum Jump


All times are GMT. The time now is 08:06 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.