Click to See Complete Forum and Search --> : How do I change the size of an image?


jammer20002
09-17-2003, 06:36 PM
Can someone tell me how I change the size of an image?

I've tried the following in a function call:

document["image0"].src.width = 300;

and I've also tried:

document.image0..src.width = 300;

In both instances above, I have an image that has been given the name image0.

What am I doing wrong?

Any help would be appreciated.

Thanks.


Jam

Khalid Ali
09-17-2003, 09:31 PM
Image is not preloaded....

pyro
09-17-2003, 09:59 PM
That should be

document["image0"].width = 300;

or

document["image0"].style.width = 300;