Hi Friends,
I am developing an web application. here in an web form i need am using two radio buttons and two combo boxes say r1and r2 for radio and c1 and c2 for comboboxes.
Here my web form inherits from master page. I need to enable c1 when r1 is checked and c2 when r2 is checked.
i need to write javascript for this. how can i do this.
Regards
Rajath
Loading
rajath rPosted Nov 25, 2010, 10:44 PM
It is not what i required my code is as follows:
Enable dropdown, disable textbox
Enable textbox, disable dropdown
Javascript is:
function abc()
{
if (document.form1.rbSelection[0].checked==true)
{
document.form1.dropdownlist.disabled=false;
document.form1.textbox.disabled=true;
}
else
{
document.form1.dropdownlist.disabled=true;
document.form1.textbox.disabled=false;
}
}
- My page inherits matster page. and above code is not working.
RegardsRajath
Madhu KPosted Nov 25, 2010, 4:50 AM
{
if(document.getElementById("RadioButton1").checked==true)
{
alert("test");//enabe combo box.
}
}