|
|
|
Exact fit new windows for pictures
|
Original Message
|
Name: Zenno
Date: August 19, 2003 at 00:33:12 Pacific
Subject: Exact fit new windows for picturesOS: Windows XPCPU/Ram: P4 1.8 / 1.5 G |
Comment: I am searching for a way to be able to opened my pictures in a new window that just fit the height and width of the jpg. So, on a web page, when you click on a thumbnail to see a particular pic, the pic opens in new non-resizable windows (with no scrollbar) that fits exactly the jpg size. I already seen that somewhere but of course can't recall where. Any help is appreciated. Thanks.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Chi Happens
Date: August 19, 2003 at 04:57:01 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)You can use JavaScript to do that. window.open('this.jpg','','width=400,height=300'); change "this.jpg" to be your image name. change width=#,height=# to reflect the width and height that you want the new window to be. NOTE: in the attributes string (where width and height are) if you don't specify resizable=1,scrollbars=1 then you wont get them, but you are welcome to add resizable=0,scrollbars=0 to explicity state this fact. hope this helps you, Chi Happens
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: SN
Date: August 19, 2003 at 08:05:09 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)You can also do this even if you don't know the size of the graphic...This is what I did on www.imageworksaz.com...click on web albums and check one out. I used a variation of this script to do it. -SN
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: Zenno
Date: August 19, 2003 at 10:52:25 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Thank you so much, i was hoping for these 2 options, javascript and html. I will tried both. Zenno.
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: SN
Date: August 19, 2003 at 12:18:13 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Actually, both approaches use javascript and html...They're really you're only options. Thanks for the response and follow up...It's a courtesy for future people reading this that few remember. -SN
Report Offensive Follow Up For Removal
|
|
Response Number 5
|
Name: Chi Happens
Date: August 19, 2003 at 13:06:53 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)SN, Not to bash your code, but he did request that the new window was NOT resizable. So my code is slightly more accurate. :)
Report Offensive Follow Up For Removal
|
|
Response Number 6
|
Name: Infinite Recursion
Date: August 19, 2003 at 14:46:44 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Since when were we all competing on code? Do I need to post my version ??? Either solution will work... Infinite Recursion
Report Offensive Follow Up For Removal
|
|
Response Number 7
|
Name: Zenno
Date: August 19, 2003 at 16:06:43 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Actually i'm quite happy with the result, even if the window is resizable. The worst was when scroll bar appears, that i didn't want the most. Thank you very much for sharing. On my next reply below a little later today, i will post a test url to show you if the script has worked or not. Thanks.
Report Offensive Follow Up For Removal
|
|
Response Number 8
|
Name: Zenno
Date: August 19, 2003 at 16:10:46 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)SN, I use the same modified code as you did on your site but mine doesn't seem to work. I'm really a beginner at this. Can you take a look at this test URL and click on the first picture: http://www.geocities.com/andreboutet/Bonne_Fete_Caroline/ Thanks a lot for your time.
Report Offensive Follow Up For Removal
|
|
Response Number 9
|
Name: Zenno
Date: August 19, 2003 at 16:33:58 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit) I made some corrections.
It seems to work now !!!!!! ...and it's not resizable. Thanks a lot everybody. Zenno.
Report Offensive Follow Up For Removal
|
|
Response Number 10
|
Name: SN
Date: August 19, 2003 at 16:40:56 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Zenno- I've had some weird results on your site when I click on the picture: I've had a page not found error, I've had a window come up that shows the html and javascript, and on the third try it started working, but there were some javascript error messages... If you can open the index.htm and popup.htm files, there is a part after </html> that says to remove the lines following it...Delete everything in both those files (and all the pages on your site) after the line that says </html> and see if that helps. I think the javascript messages are coming from those lines, but if I'm wrong then post back and we'll troubleshoot it a bit. -SN P.S. If you're going to use this picture script, it would be ideal to make your pictures no greater than 550 pixels tall, to accomodate users of lower screen resolutions like myself.
Report Offensive Follow Up For Removal
|
|
Response Number 11
|
Name: Chi Happens
Date: August 19, 2003 at 17:06:27 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)IR, Um...I was just joking around. That's why I put a little smiley :) instead of signing. Chi Happens
Report Offensive Follow Up For Removal
|
|
Response Number 12
|
Name: Zenno
Date: August 19, 2003 at 17:06:48 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Humm..... Since i did not saw those lines in my originals .htm, i looked at the source while viewing the web page online, I don't think those lines can be removed because they seems generated by the web hosting service, Geocities. Zenno.
Report Offensive Follow Up For Removal
|
|
Response Number 13
|
Name: SN
Date: August 19, 2003 at 17:13:08 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Z-Dawg: Nevermind if you got it working...You seemed to be making corrections as I was testing it out...That's why I got different results each time, and why I posted an outdated response:-) I still get javascript error messages, but I believe that may be my fault...I also get them occasionally on computing.net and microsoft.com...If you don't get them, then I guess you're good to go. The site looks nice, by the way. -SN
Report Offensive Follow Up For Removal
|
|
Response Number 14
|
Name: Zenno
Date: August 19, 2003 at 17:21:45 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)No no, i do also get these errors messages. The script is working like a charm for the first 2 pictures now, but i get the message at the bottom of my IE: Done, but with errors on page. I think this might have something to do with Geocities script for putting a pop up publicity window on each new visit of a web site. Our script may be interferring with that. Zenno.
Report Offensive Follow Up For Removal
|
|
Response Number 15
|
Name: Zenno
Date: August 19, 2003 at 17:24:48 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)Forgot to say thanks for the nice comment about the site. I just find out that i cannot upload my videos .WMV on geocities. Even if i rename them, they always get rejected. That's odd. But, this must be the price to pay for having a free web hosting service. Zenno.
Report Offensive Follow Up For Removal
|
|
Response Number 16
|
Name: wizard-fred
Date: August 19, 2003 at 21:15:48 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)A second for limiting the size of your images so that it can be viewed on a 640x480 screen. Some of us still have old monitors and video cards or old laptops of fixed resolution.
Report Offensive Follow Up For Removal
|
|
Response Number 17
|
Name: Zenno
Date: August 20, 2003 at 01:30:39 Pacific
Subject: Exact fit new windows for pictures |
Reply: (edit)About that picture resolution thing, i'm usually careful with that but this time, the web site i was building was for my immediate family and they all have recent equipment capable of handling these sizes of pictures. They all have at least 800x600 or 1024x768 and some 1600x1200. That was not a public web site but rather a personal one. But thanks for the remarks.
Report Offensive Follow Up For Removal
|
Use following form to reply to current message:
|
|

|