I am using the ASP.net version of the rad controls (RadControls for
ASP.NET AJAX Q1 2011 SP1). I have a RadComboBox that, when the value is
set to Other, should display a RadTextBox for data entry, here is the
definition and JavaScript i am using:
The last line in the script ($find("#<%= rtbIndustryOther.ClientID %>").set_visible(false);) immediately throws an error:
"Microsoft JScript runtime error: Unable to get value of the property 'set_visible': object is null or undefined"
What am I doing wrong as this is driving me nuts...
<
telerik:RadComboBox
runat
=
"server"
ID
=
"rcbIndustry"
OnClientSelectedIndexChanged
=
"OnClientSelectedIndexChanged"
Skin
=
"Black"
Width
=
"269"
EnableEmbeddedSkins
=
"false"
/>
<
span
id
=
"tmp"
></
span
>
<
telerik:RadTextBox
runat
=
"server"
ID
=
"rtbIndustryOther"
Skin
=
"Black"
Width
=
"250"
EnableEmbeddedSkins
=
"false"
/>
<
script
>
function OnClientSelectedIndexChanged(sender, eventArgs) {
if (eventArgs.get_item().get_value() == 'Other') {
$find("#<%= rtbIndustryOther.ClientID %>").set_visible(true);
$("#tmp").html('<
br
>');
}
else {
$("#<%= rtbIndustryOther.ClientID %>").set_visible(false);
$("#tmp").html('');
}
}
$find("#<%= rtbIndustryOther.ClientID %>").set_visible(false);
</
script
>
The last line in the script ($find("#<%= rtbIndustryOther.ClientID %>").set_visible(false);) immediately throws an error:
"Microsoft JScript runtime error: Unable to get value of the property 'set_visible': object is null or undefined"
What am I doing wrong as this is driving me nuts...