A JS problem

From: Date: Sun, 02 Mar 2003 03:55:58 +0000
Subject: A JS problem
Groups: php.general 
Request: Send a blank email to php-general+get-137749@lists.php.net to get a copy of this message
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>&nbsp;")} 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>&nbsp;")} 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>&nbsp;")} </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/

« previous php.general (#137749) next »