making check boxes clickable once in javascript?

Posted by OVERTONE on Stack Overflow See other posts from Stack Overflow or by OVERTONE
Published on 2010-04-28T14:01:36Z Indexed on 2010/04/28 14:33 UTC
Read the original article Hit count: 309

Filed under:
|

Sorry but im an absolute noob with javascript.

Ive made a form for a simple quiz but cant figure out how to make radio's only click once.

I can select two or three buttons as my answer. i want to change this.

<form name = "Beginners Quiz">

<p>Film speed refers to:</p>
<p><input type="radio" name="Answer 1" id="Answer1" value = "a" onclick =  "recordAnswer(1,this.value"/>How long it takes to develop film. <br/>
<p><input type="radio" name="Answer 2" id="Answer2" value = "b" onclick = "recordAnswer(1,this.value"/>How fast film moves through film-transport system.  <br/>
<p><input type="radio" name="Answer 3" id="Answer3" value = "c" onclick = "recordAnswer(1,this.value"/> How sensitive the film is to light.  <br/>
<p><input type="radio" name="Answer 4" id="Answer4" value = "d" onclick = "recordAnswer(1,this.value"/> None of these makes sense. <br/>

ive been rooting around w3shcools tutorials to no avail. can someone shed some light?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about radiobutton