Results 1 to 9 of 9
  1. #1

    Make images fit to window when opened??!?!

    I heard that there was a php code for this, i am doing this all manually in dreamweaver. when you click on an image, it opens it within a new window, that is size to the picture and has nothing but the picture. Do you know where i can find this php code at or what its called? Thx!!

  2. #2
    Join Date
    Nov 2001
    Location
    California
    Posts
    1,991
    That's a javascript, there is no php code that can pop open a window. Search on google for javascript pop-up scripts.

  3. #3
    Join Date
    Mar 2002
    Location
    Toronto
    Posts
    237
    Actually there is a php script that can popup windows.
    Its called PHP No Margin Image Pop up - it will read the image width and height on its own and create a popup that fits it perfectly.

    Its brought to you by the php gals Dodo and Daynah =)

    You can find it here

    http://daynah.net/downloads/#nmimage

    Sorry i didnt give you the name earlier...I must of been typing in my sleep

    Edit: I must be still sleeping - its a php script but it interfaces with javascript I think

  4. #4
    Join Date
    Aug 2000
    Location
    Tacoma, Washington
    Posts
    9,576
    The Macromedia Exchange had an extention named 'Just So Picture Window' that will do the job for you perfectly, since you say you're using Dreamweaver. It's javascript but is very good unless you specifically need PHP

    Greg Moore
    Former Webhost... now, just a guy.

  5. #5
    doesnt matter if its java or php, just want it to do it for me...doing over 100+ pics...gets tiring....how do i install the code though? thx!

  6. #6
    Join Date
    Jan 2002
    Location
    Minnesota
    Posts
    69
    I made something like this using Perl, it was pretty easy. If you want to use PHP, you are going to need to use JS, but it isn't that hard. Just create some file like "image.php?url=" and have the url be the image. Then use the common JS code to do this.

    For the pop-up window, just use normal pop-up window code, but have the file it goes to be the "image.php" and have the image phrased in the url. I did do this on one of my websites, but people said that the images were too big for their screen occasionally. Which is why I just have the images displayed on their own pages.. see here: http://www.gbprops.com/props_index.php/1 Click on any image, and it will go in its page. You can do this by just having the picture in the url, and not have any resizing or pop-up windows.

    I also customized my page by following the image file names pattern, and being able to go to the next and previous images. Pretty cool actually.

    Hope this helps!

  7. #7
    Join Date
    Aug 2000
    Location
    Tacoma, Washington
    Posts
    9,576
    Originally posted by Z400Central
    doesnt matter if its java or php, just want it to do it for me...doing over 100+ pics...gets tiring....how do i install the code though? thx!
    Well if you've downloaded the extension manager (for dreamweaver 3) then that will do it for you. Dreamweaver 4 installs with the manager already. You download the extension from the macromedia site to a folder somewhere, open the manager and install it. Restart Dreamweaver and the Justso Picture window will appear under the behaviours menu. Select the image, then select JustSo from the drop down menu in the behaviours window. That'll open the dialogue box which you fill in with the large image, page background color, and where it's full screen - or in your case - 'hug image'. Done. Repeat for them all and you'll be laughing - cuts a *lot* of time down from making all those seperate pop-up windows.

    Greg Moore
    Former Webhost... now, just a guy.

  8. #8
    Thank you thank you thank you!!! i downloaded the JustSo and it works great!!!!!!!! it still takes a while with over 200 pics...but WAY WAY WAY better than doing it manually!! THANK YOU!!

  9. #9
    Join Date
    Nov 2001
    Location
    California
    Posts
    1,991
    Originally posted by Shi
    Actually there is a php script that can popup windows.
    Its called PHP No Margin Image Pop up - it will read the image width and height on its own and create a popup that fits it perfectly.

    Its brought to you by the php gals Dodo and Daynah =)

    You can find it here

    http://daynah.net/downloads/#nmimage

    Sorry i didnt give you the name earlier...I must of been typing in my sleep

    Edit: I must be still sleeping - its a php script but it interfaces with javascript I think
    It's still JavaScript. PHP can't pop a window.

Posting Permissions

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