Jump to content

Recommended Posts

I have the following code.  When executed, if you select one button then select the other button, it does not clear the first button, so both buttons are selected.  I can't see what I've done wrong.  Any help?

 

<!DOCTYPE html>
<html>
<body>

<h2>Radio Buttons</h2>

<p>The <strong>input type="radio"</strong> defines a radio button:</p>

<form action="/action_page.php">
<tr>
<td><select name="os0">
<option value="$5 donation">$5 donation $5.00 USD</option>
<option value="$10 donation">$10 donation $10.00 USD</option>
<option value="$25 donation">$25 donation $25.00 USD</option>
<option value="$50 donation">$50 donation $50.00 USD</option>
<option value="$100 donation">$100 donation $100.00 USD</option>
</select></td></tr>
<br><br>
<tr>
<td>
  <input name="on1" 
  <input type="radio" id="memory" value="In Memory of">
  <label for="memory">In Memory of: </label><br>
  <input type="radio" id="honor" name="honor" value="In Honor of">
  <label for="honor">In Honor of: </label><br><br>
</td>
</tr>
</form> 

</body>
</html>

Link to post
Share on other sites

Provide same name to radio button group like:

<input type="radio" id="memory" name="AnyName" value="In Memory of">

<input type="radio" id="honor" name="AnyName" name="honor" value="In Honor of">

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...