0

Hi,
I have some radiobuttons which I grouped them as set1..and another set of radiobuttons which I grouped as set2 which are disabled by default.When I click a radiobutton in set1 all the radiobuttons in set2 should be enabled and when I uncheck, all the radiobuttons should again become disabled.
How can this be done..plzz reply.

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Traicey
0

You can use if statement using ur radio button groups which are, in ur case set1 and set2, and inside them have statements like

document.Formname.NameOfTheRAD.selected="False" or "true"

And another thing you may post ur code so that we can be aware of what we are trying to achieve right??

0

SET1 <asp:RadioButton ID="rdintrvl" runat="server" Text="Interval" GroupName="set1" /> SET2

<asp:RadioButton ID="rddays" Text="Days" GroupName="set2" runat="server" Enabled="False"/>
<asp:RadioButton GroupName="set2"  ID="rdweeks" Text="Weeks" runat="server" Enabled="False"/>
<asp:RadioButton GroupName="set2"  ID="rdmonths" Text="Months" runat="server" Enabled="False"/>

in the page load rdintrvl.Attributes.Add("onclick", "enable();"); javascript function is

function enable()
{
   
     document.getElementById('<%=rddays.ClientID%>').disabled = false;
      document.getElementById('<%=rdweeks.ClientID%>').disabled = false;
       document.getElementById('<%=rdmonths.ClientID%>').disabled = false;
}
0

So its not really a Javascript but VBscript not that I know but according to my understanding I think you need to use VBScript or C# when dealing with ASP.net and Im not really equiped about VBscript

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.