Jump to content


Photo

Form fields


  • Please log in to reply
1 reply to this topic

#1 fert

fert
  • Members
  • PipPipPip
  • Advanced Member
  • 1,114 posts

Posted 30 June 2006 - 08:39 AM

<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>
I was wondering how can I add five to the value of the last textbox when the radio button is clicked on?

Si hoc legere scis nimium eruditionis habes
Gentoo Linux 2007.0 Firefox 2

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 01 July 2006 - 02:01 PM

Have an onclick that does

document.getElementById('idofthetextbox').value = document.getElementById('idofthetextbox').value * 5





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users