Click to See Complete Forum and Search --> : How do I transfer a "value"?


Lon
08-26-2003, 02:27 PM
How do I transfer the value from this line:(value="40%")

<form name="per" method="document">
<input name="percent" type="radio" value="40%">40%

to this line:(height="40%")

<img src="lon 004.jpg" getimagesize("lon 004.jpg");width="40%" height="40%" alt="004">

I want to give the "image height the value from the radio button selected. This will allow the image to be resized on my page by the selected value. I don't want to open a new window, I actually want to resize several images at the sane time.

Maybe there is a script that will do this for me?

Thanks Lon

David Harrison
08-26-2003, 05:21 PM
This should work but it's not been tested:

<script type="text/javascript"><!--

function resizeimg(h){

document.getElementById("imgchangeheight").style.height=h;

}

//--></script>

</head><body>

<form name="per" method="document">
<input name="percent" type="radio" value="40%" onclick="resizeimg("40%");">40%

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