Re: <img> width height
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: <img> width height

From: ASM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date: Sat Apr 22 2006 - 02:49:24 CEST

News a écrit :
>
> What does this mean??
>
>>var myWidth= myImage.style&&myImage.style.width? myImage.style.width :
>> myImage.width; //attempt to capture width of <img>
>
> At first I thought it was a triune if true this else that type statement but
> I don't have a clue what it is.

yes it was (would have to be).

if myImage has style and myImage has style width,
  miWidth is myImage.style.width
else
  miWidth is myImage width

because perhaps your image has no style (or no width or height style) ?

in fact the error was much more stupid
(all as I've done in my code myWidth=myImage.style.height ! !)

-- 
Stephane Moriaux et son [moins] vieux Mac
Received on Mon May 1 05:14:23 2006