Click to See Complete Forum and Search --> : resizing an image using radio buttons?


Lon
08-26-2003, 09:35 AM
I have been trying to write a little script to change an image size by percent using radio buttons? I don't need to use radio buttons but only want to give an exact input that a button would give me. My script in "HTML" is below. (it don't work yet)......

<form name="cSize" method="document">
<input name="percent" type="radio" value="40%">40% (Smaller)<br>
<input name="percent" type="radio" checked value="50%">50% (good)<br>
<input name="percent" type="radio" value="70%">70% (Bigger)<br>

<img src="lon 004.jpg" getimagesize("lon 004.jpg");width="auto" height="percent" alt="004">
</form>

can anyone help with this? I think that it needs to be done in java?
Lon
:confused:

Khalid Ali
08-26-2003, 11:11 PM
the img element has width and height attributes,you can set these values as

<img src="lon 004.jpg" width="40%" height="40%t" alt="004">