| | |
javascript for enabling and disabling
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2006
Posts: 17
Reputation:
Solved Threads: 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.
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.
You can use if statement using ur radio button groups which are, in ur case set1 and set2, and inside them have statements like And another thing you may post ur code so that we can be aware of what we are trying to achieve right??
•
•
•
•
document.Formname.NameOfTheRAD.selected="False" or "true"
Last edited by Traicey; Apr 9th, 2008 at 3:55 pm.
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
•
•
Join Date: Nov 2006
Posts: 17
Reputation:
Solved Threads: 0
SET1
in the page load
javascript function is
<asp:RadioButton ID="rdintrvl" runat="server" Text="Interval" GroupName="set1" /> SET2 ASP Syntax (Toggle Plain Text)
<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
JavaScript Syntax (Toggle Plain Text)
function enable() { document.getElementById('<%=rddays.ClientID%>').disabled = false; document.getElementById('<%=rdweeks.ClientID%>').disabled = false; document.getElementById('<%=rdmonths.ClientID%>').disabled = false; }
Last edited by peter_budo; Apr 11th, 2008 at 8:15 pm. Reason: Keep It Organized - please use [code] tags
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: IIS Setup for AJAX
- Next Thread: javascript onclick is not working in IE7 & IE6
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxhelp animate api automatically beta boarder box bug calendar card checkbox child class column cookies createrange() css cursor dependent disablefirebug dom download dropdown editor element engine error events explorer ext file firehose flash form forms game google gwt html htmlform ie8 iframe image() images internet java javascript jawascriptruntimeerror jquery jsf jsfile jump math matrixcaptcha microsoft mimic mp3 mysql object offline onmouseoutdivproblem onreadystatechange parent passing pdf php player post problem progressbar rated rating regex runtime scroll search select session shopping size sql star stars stretch text textarea twitter validation w3c web website window windowofwords windowsxp wysiwyg xml xspf \n





