Results 1 to 5 of 5

Thread: Auto-centering Popup Window

  1. #1
    Join Date
    Aug 2006
    Posts
    101
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Auto-centering Popup Window

    1) Script Title: Auto-centering Popup Window

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...autocenter.htm

    3) Describe problem:

    For my website I have used a.m. script to show an enlarged detail of a painting. See http://www.arti-mo.com/kunstenaars/j...werkjst005.htm and than click on "klik hier voor een detail van het kunstwerk".

    Now the size of the window that will be openened is fixed on 1024 px width and 768 px height. The picture to be shown has a size of 525 x 700 px, but can sometimes be different.

    Is there a way to change the script in such a way that the size of the window to be opened will adjust itself automatically to the size of the picture that will be shown?

    Thanks for any usefull help!

    Enjoy your day
    Monique

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,030
    Thanks
    44
    Thanked 3,211 Times in 3,173 Posts
    Blog Entries
    12

    Default

    I'm not sure what a.m. script is. The DD script that you are using can accept whatever dimensions that you wish to pass to it. If, in addition to that, you pass it a unique name for each invocation, things should work out fairly well.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2006
    Posts
    101
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I realize I can use any size required, however now I would need to change the size for every new item or have a fixed size for all items and accept a window with white areas.

    Is there a way to work with sort of "flexible" size for each item that adjust the windowsize automatically to the size needed for each picture? In order to avoid I'd have to change it for every item... In fact I'm a bit lazy...

    Monique

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,030
    Thanks
    44
    Thanked 3,211 Times in 3,173 Posts
    Blog Entries
    12

    Default

    You really cannot 'get' the dimensions of an image until it is loaded. With images of the size of your example, that would take too long. However, if you abandon a pop up viewer in favor of one like:

    http://www.dynamicdrive.com/dynamici...box2/index.htm

    or:

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

    Since the image will be displayed on the page, size is no longer an issue. These two scripts have the added advantage that they cannot be blocked by pop up blockers.
    - John
    ________________________

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

  5. #5
    Join Date
    Aug 2006
    Posts
    101
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    That's a very good idea John. In fact I have just used Lightbox image viewer 2.0 in the new website I am developping for a foundation that organizes special events for metally and physically handicapped persons in Holland. I have a specific question about this, which I will post within the next minutes in a new thread.

    Monique

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •