Hello,
I am having trouble getting an instance of my radcombobox in my javascript code. It just returns an "Object."
I have gone over it many times and can't seem to find what I am missing. Please help.
Thanks
I am having trouble getting an instance of my radcombobox in my javascript code. It just returns an "Object."
function
OnCheck_Changed(cb) {
var
add1 = $get(
"<%= txt_Address.ClientID %>"
);
var
add2 = $get(
"<%= txt_Address2.ClientID %>"
);
var
city = $get(
"<%= txt_City.ClientID %>"
);
var
zip = $get(
"<%= txt_PostalCode.ClientID %>"
);
var
state = $find(
"<%= cb_State.ClientID %>"
);
var
hadd1 = $get(
"<%= hdf_Address.ClientID %>"
);
var
hadd2 = $get(
"<%= hdf_Address2.ClientID %>"
);
var
hcity = $get(
"<%= hdf_City.ClientID %>"
);
var
hstate = $get(
"<%= hdf_State.ClientID %>"
);
var
hzip = $get(
"<%= hdf_PostalCode.ClientID %>"
);
if
(cb.checked ==
true
) {
//alert(hadd1);
add1.value = hadd1.value;
add2.value = hadd2.value;
city.value = hcity.value;
zip.value = hzip.value;
//var select = state.findItemByValue(hcity.value);
//select.select();
add1.readOnly =
true
;
add2.readOnly =
true
;
city.readOnly =
true
;
zip.readOnly =
true
;
//state.Disable();
}
else
{
//alert(state);
add1.readOnly =
false
;
add2.readOnly =
false
;
city.readOnly =
false
;
zip.readOnly =
false
;
//state.Enabled = true;
}
}
This is the radcombobox I am trying to get:<
telerik:RadComboBox
ID
=
"cb_State"
runat
=
"server"
DataSourceID
=
"eds_States"
HighlightTemplatedItems
=
"true"
AutoPostBack
=
"false"
Skin
=
"Simple"
DropDownWidth
=
"195"
EnableLoadOnDemand
=
"True"
Width
=
"75px"
DataValueField
=
"STATE_CODE"
DataTextField
=
"STATE_CODE"
OnDataBound
=
"cb_State_DataBound"
Enabled
=
"false"
>
<
HeaderTemplate
>
<
table
>
<
tr
>
<
td
style
=
"width: 45px"
>
State Code
</
td
>
<
td
style
=
"width: 150px"
>
State Name
</
td
>
</
tr
>
</
table
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
table
>
<
tr
>
<
td
style
=
"width: 45px"
>
<%# DataBinder.Eval(Container.DataItem, "STATE_CODE")%>
</
td
>
<
td
style
=
"width: 150px"
>
<%# DataBinder.Eval(Container.DataItem, "STATE")%>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
I have gone over it many times and can't seem to find what I am missing. Please help.
Thanks