[Message Deleted]
-
[Message Deleted]
-
[Message Deleted]
you given wrong condtion.. document.form1.txt1.disabled=true; put document.form1.txt1.enabled=true; function select() { if(document.getElementById("RadioButton1").checked==true) { document.form1.txt1.enabled=true; } else { document.form1.txt1.disabled=true; } }
-
you given wrong condtion.. document.form1.txt1.disabled=true; put document.form1.txt1.enabled=true; function select() { if(document.getElementById("RadioButton1").checked==true) { document.form1.txt1.enabled=true; } else { document.form1.txt1.disabled=true; } }
i put alert(1) in that javascript function.But that function is not working .
-
i put alert(1) in that javascript function.But that function is not working .
is there onclick event in radiobutton...check it
-
is there onclick event in radiobutton...check it
If the radio button is checked i want to set the visiblility of that text box false.but its not working
-
If the radio button is checked i want to set the visiblility of that text box false.but its not working
I think server radiobutton should not contain onclick event... otherwise you will take html radio button instead of server radiobutton...
-
I think server radiobutton should not contain onclick event... otherwise you will take html radio button instead of server radiobutton...
i use the following code to hide text boxes function select1() { if(document.form1.RadioButton1.checked==true) { document.getElementById("TextBox1").style.visibility='hidden'; document.getElementById("TextBox2").style.display='visible'; } else { document.getElementById("TextBox1").style.visibility='visible'; document.getElementById("TextBox2").style.visibility='hidden'; } } <script> <sp:radiobutton id="RadioButton1" runat="server" onclick="javascript:select1();" xmlns:sp="#unknown"> <asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown"></asp:textbox> <asp:textbox id="TextBox2" runat="server" xmlns:asp="#unknown"></asp:textbox> its working correctly but when i set texbox visibility false it display an error. On page load i want to set the visibility of text boxes false .It will visible only radio button click.i think u can understand my problem.pls help me. </sp:radiobutton>
-
[Message Deleted]
First of all, radio button does not work like as checkbox. I mean that when you check radio button on first click,you can not able to uncheck it on second click.so you can not disabled or enabled textbox by checking radio button is check or uncheck. Que : why have you taken radio button? you could also take checkbox.
please don't forget to vote on the post that helped you.
-
i use the following code to hide text boxes function select1() { if(document.form1.RadioButton1.checked==true) { document.getElementById("TextBox1").style.visibility='hidden'; document.getElementById("TextBox2").style.display='visible'; } else { document.getElementById("TextBox1").style.visibility='visible'; document.getElementById("TextBox2").style.visibility='hidden'; } } <script> <sp:radiobutton id="RadioButton1" runat="server" onclick="javascript:select1();" xmlns:sp="#unknown"> <asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown"></asp:textbox> <asp:textbox id="TextBox2" runat="server" xmlns:asp="#unknown"></asp:textbox> its working correctly but when i set texbox visibility false it display an error. On page load i want to set the visibility of text boxes false .It will visible only radio button click.i think u can understand my problem.pls help me. </sp:radiobutton>
better you can try with checkbox...