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: News <warren@no_S_P_A_M_wyght.com>
Date: Sat Apr 22 2006 - 01:57:20 CEST

test wrote:
> On Fri, 21 Apr 2006 21:46:37 GMT, News wrote:
>
>> I am trying to be able to manipulate the width and height of an
>> <img> but do not seem to be able.
>>
>> "Yes", I know the JavaScript will "not" manip anything, which is ok.
>> I simply do not know how to capture the width or height. Once I can
>> do that I can manipulate them.
>>
>> Here is the HTML for the <img>
>> <div class="ImgMnp" id="myImg" onmouseover="imgSize('myImg','fpImg)">
>
> There is a syntax error in this line, near the end. You're
> missing an apostrophe. It should go:
>
> <div class="ImgMnp" id="myImg"
> onmouseover="imgSize('myImg','fpImg');">
>
> Don't know if that was what was breaking the code though.

I did not know I need that apostrophe thanks.

Nope did not correct the problem, if I take out these two lines

   var myWidth=myImage.style.width;
   var myHeight=myHeight.style.height;

the function works, put them in the function crashes.

-- 
Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Received on Mon May 1 05:14:14 2006