I have the following form code but I cannot select the sell radio in IE and I can select both radios at once in Google Chrome.
<form method="post" action="dothemath.php" style="width: 403px" class="style1">
<input type="radio" id="rdobuy" style="width: 20px; height: 21px;" checked="checked"/>
<label>Buy</label>
<input type="radio" id="rdosell" style="width: 20px; height: 21px;"/>
<label >Sell</label>
</form>
Is there any thing I am missing...?
Your radio buttons don't have name attribute. They need them for two reasons.
You also need a value to say what the submitted data is going to be.
As an aside, your <label>s are useless as they aren't associated with any controls. They need a for attribute with the same value as the id of the control they are to be associated with.
<form method="post" action="dothemath.php">
    <input type="radio" id="rdobuy" name="foo" value="buy" checked="checked"/>
    <label for="rdobuy">Buy</label>
    <input type="radio" name="foo" value="sell" id="rdosell" />
    <label for="rdosell">Sell</label>
</form>
                        You should add a name attribute and the names should be same for both radios.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With