Jump to content

Archived

This topic is now archived and is closed to further replies.

fert

Form fields

Recommended Posts

[code]
<p><input type="text" name="number1" size="20"> <input type="text" name="number1" size="20"> <input type="text" name="number1" size="20"></p>
<p>Numbers must be between 0 and 20</p>
<p><font size="1">Chance 1 in 8000</font></p>

<p>Options:</p>
<p><input type="radio" name="multiply">Multiply</p>
<p><input type="text" name="total" readonly value="5"></p>
<p><input type="submit" value="Submit"></p>
[/code]
I was wondering how can I add five to the value of the last textbox when the radio button is clicked on?

Share this post


Link to post
Share on other sites
Have an onclick that does

[code]document.getElementById('idofthetextbox').value = document.getElementById('idofthetextbox').value * 5[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.