I know this is a php forum. Please don't be upset with me, but I have a JS problem which nobody I know can seem to figure out. Here goes:
<script LANGUAGE="JavaScript"> var w1 = "1000"; var h1 = "672"; if (w1 <= screen.width){ if (h1 <= screen.height){ document.write("<a href="/pics.php?view=popup&image=2003-01-January/image1.jpg" onclick="NewWindow(this.href,'popup','1000','672','no');return false;"><img src="/pics/2003-01-January/image1-thumb.jpg" border="0" alt="Image 1 of 64"></a> ")} else{ document.write("<a href="/pics.php?view=popup&image=2003-01-January/image1.jpg" onclick="NewWindow(this.href,'popup','1000','screen.height','yes');return false;"><img src="/pics/2003-01-January/image1-thumb.jpg" border="0" alt="Image 1 of 64"></a> ")} else{ document.write("<a href="/pics.php?view=popup&image=2003-01-January/image1.jpg" onclick="NewWindow(this.href,'popup','screen.width','screen.height','yes');return false;"><img src="/pics/2003-01-January/image1-thumb.jpg" border="0" alt="Image 1 of 64"></a> ")} </script> I am trying to make a popup window for a big image to match it's size using php's getimagesize() function, setting that in the browser as var w1 and h1. Then trying to get JS to popup a window with or without scroll bars depending on your screen size... I know this is complicated. But it's fun. if anyone knows anyplace that I am messing up, or wants to see the php of this w/ the JS, let me know. Thanx to all for your great advise. -Dade __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php