I have a weird issue that only seems to be a problem with Firefox, but
works ok in IE.

I'm adding a radio button using .appendTo and adding the button works
fine, but with Firefox it appears the button is not in the correct
group as selecting it will not deselect anything else in the group.

Selecting it in IE will correctly deselect anything else in the group.

I have reduced the code to just the bare essentials just for
troubleshooting, but you can see what happens.

Here is the HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
        <script type="text/javascript" src="/js/jquery.js"></script>
        <script>
                function responsePurchase2(response,status) {
                        var myinput = '<input type="radio" name="gloves" 
value="999">' +
response + '</input><br />';
                        var myappend = 'div.gloves_wear';
                        $(myinput).appendTo(myappend);
                        return false;
                }
        </script>
</HEAD>
<BODY>
        <table border="0">
                <form method="post" action="/fighter-equipment.php?fighterid=97"
name="gloveswear" id="gloveswear">
                        <tr>

                                <td>
                                        <div class="gloves_wear">
                                                <input type="radio" 
name="gloves" value="0" checked>None</input>
(no bonus)<br />
                                                <input type="radio" 
name="gloves" value="1" >speed company
gloves</input> (+1 Speed)<br />
                                                <input type="radio" 
name="gloves" value="2" >speed company
gloves</input> (+1 Speed)<br />

                                                <input type="radio" 
name="gloves" value="3" >speed company
gloves</input> (+1 Speed)<br />
                                        </div>
                                </td>
                        </tr>
                </form>
                <tr>
                        <td colspan="2" align="center">

                                <a href="#" 
onclick="responsePurchase2(1,1)">TEST</a>
                        </td>
                </tr>
        </table>
</BODY>
</HTML>




and you can see a test here:
http://www.leaguefighter.com/test.php

Select any of the radio buttons, then click the link TEST and click on
the new radio button.

It works for me in IE but not Firefox.  I'm sure I'm doing something
wrong, but haven't been able to find it so far.

Reply via email to