fert Posted June 30, 2006 Share Posted June 30, 2006 [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? Link to comment https://forums.phpfreaks.com/topic/13274-form-fields/ Share on other sites More sharing options...
hitman6003 Posted July 1, 2006 Share Posted July 1, 2006 Have an onclick that does [code]document.getElementById('idofthetextbox').value = document.getElementById('idofthetextbox').value * 5[/code] Link to comment https://forums.phpfreaks.com/topic/13274-form-fields/#findComment-51691 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.