Login Register

Radio Buttons with same name in different form tags causes problems

I have two yes/no radio buttons with the same name located in two different forms. When you click on one set of the radio buttons, the other set is unchecked (and vice versa). The id's of the two radios are different, but the names are the same. It's as though dojo isn't using the id but rather the name attribute.

If I remove the dojo tags from the input fields, the radio buttons work fine. I am using dojo 1.1.1.

It seems that this is a bug as you should be able to have two different form elements with the same name as long as they are in different forms.

Any feedback would be greatly appreciated.

Thanks,

John

Sample code below

<head>
 
    <title>Dojo: Hello World!</title>
    <!-- SECTION 1 -->
    <style type="text/css">
        @import "dojoroot/dijit/themes/tundra/tundra.css";
        @import "dojoroot/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="dojoroot/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
    <script type="text/javascript">
       // Load Dojo's code relating to the Button widget
       dojo.require("dijit.form.Button");
       dojo.require("dojo.parser");
    </script>
</head>
<body class="tundra">

        <form>     
                <input dojoType="dijit.form.RadioButton" id="sum1" name="album" value="metallica" type="radio" checked/>
               <label for="sum1"> Metallica </label>
                <input dojotype="dijit.form.RadioButton" id="sum2"  name="album" value="Extreme" type="radio" />
                <label for="sum2"> Extreme </label>
                <input dojotype="dijit.form.RadioButton" id="sum3"  name="album" value="Slayer" type="radio"  />
                <label for="sum3"> Slayer </label>
                <button dojoType="dijit.form.Button" id="submitButton" type="submit">Submit</button>       
    </form> 
   
        <form>
                <input dojoType="dijit.form.RadioButton" id="sum1_x" name="album" value="metallica" type="radio" checked/>
                <label for="sum1"> Metallica </label>
              <input dojotype="dijit.form.RadioButton" id="sum2_x"  name="album" value="Extreme" type="radio" />
                <label for="sum2"> Extreme </label>
                <input dojotype="dijit.form.RadioButton" id="sum3_x"  name="album" value="Slayer" type="radio"  />
                <label for="sum3"> Slayer </label>
                <button dojoType="dijit.form.Button" id="submitButton_x" type="submit">Submit</button>       
    </form>           
</body>