Javascript or JQuery for ASP.NET RadioButtonGroup
<p>I just need to get the selected index from my radiobuttongroup on the client side. However, I'm really new to Javascript/JQuery, and came across some behavior that seemed really odd. I have a dropdownlist and a radiobuttongroup in the same table.  In my script, I have the following:</p>

<pre><code>var ddlStatuses = $find("&lt;%= ddlStatuses.ClientID %&gt;");
var rbgAssetClass = $find("&lt;%= rbgAssetClass.ClientID %&gt;");
</code></pre>

<p>The first $find works as I would expect, but the second is returning null.</p>

<p>So two questions. What's the best way to find my radiobuttongroup and get its selected index, and why is $find finding one of these controls but not the other when they're in the same table?</p>

<p>Thanks</p>

<p>Edited to show aspx:</p>

<pre><code>    &lt;asp:Panel ID="pnlSelectRoom" CssClass="pnlSelectRoom" runat="server" Width="930px"&gt;
        &lt;asp:Table ID="Table1" runat="server" class="tblSelectRoomLayout" Width="100%"&gt;
            &lt;asp:TableRow&gt;
                &lt;asp:TableCell&gt;
                    &lt;asp:Label ID="Label6" runat="server" Text="Data Center" Font-Size="Small" &lt;/asp:Label&gt;
                &lt;/asp:TableCell&gt;
                &lt;asp:TableCell&gt;
                    &lt;asp:DropDownList Width="225px" ID="ddlDataCenter" runat="server" onchange="PopulateRooms(this);"
                        ZIndex="9001" Font-Size="Small" DataValueField="Id" DataTextField="Name" &gt;
                    &lt;/asp:DropDownList&gt;
                &lt;/asp:TableCell&gt;
                &lt;asp:TableCell&gt;
                    &lt;asp:Label ID="Label7" runat="server" Text="Room" Font-Size="Small"&gt;&lt;/asp:Label&gt;
                &lt;/asp:TableCell&gt;
                &lt;asp:TableCell&gt;
                    &lt;asp:DropDownList Width="225px" ID="ddlRooms" runat="server"  ZIndex="9001" Enabled ="false"&gt;
                    &lt;/asp:DropDownList&gt;
                &lt;/asp:TableCell&gt;
                &lt;asp:TableCell&gt;
                    &lt;asp:Label ID="Label8" runat="server" Text="Asset Status"&gt;&lt;/asp:Label&gt;
                &lt;/asp:TableCell&gt;
                &lt;asp:TableCell&gt;
                    &lt;telerik:RadComboBox Width="225px" runat="server" ID="ddlStatuses" DataValueField="ID"
                        DataTextField="Text" CheckBoxes="true" EnableCheckAllItemsCheckBox="True" ZIndex="9001" CausesValidation="false"&gt;
                    &lt;/telerik:RadComboBox&gt;                        
                &lt;/asp:TableCell&gt;
            &lt;/asp:TableRow&gt;
            &lt;asp:TableRow Width="100%"&gt;
                &lt;asp:TableCell ColumnSpan="6" HorizontalAlign="Center"&gt;
                    &lt;asp:RadioButtonList CssClass="checkBoxAlign" ID="rbgAssetClass" runat="server" AutoPostBack="false"
                        RepeatDirection="Horizontal"
                        Font-Size="Small"&gt;
                        &lt;asp:ListItem Selected="True"&gt;Base Assets&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/asp:ListItem&gt;
                        &lt;asp:ListItem&gt;Contained Assets&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/asp:ListItem&gt;
                        &lt;asp:ListItem&gt;SubContained Assets&lt;/asp:ListItem&gt;
                        &lt;asp:ListItem&gt;All Assets&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/asp:ListItem&gt;
                    &lt;/asp:RadioButtonList&gt;
                &lt;/asp:TableCell&gt;
            &lt;/asp:TableRow&gt;
        &lt;/asp:Table&gt;
    &lt;/asp:Panel&gt;
</code></pre>
