I have a form with two RadComboBoxes. One contains a list of states and the other contains a list of counties. Basically, this is a cascading droplist scenario. The OnClientSelectedIndexChanged event on the States RadComboBox is set to ChildRadComboChange shown below. To populate the Counties RadComboBox when a state is selected, I run a LoadCounties method that is triggered by the State.ItemsRequested event. So far, so good.
The problem comes in when the ChildRadComboLoad function runs (shown below). The line childCombo.ClearItems() throws a Microsoft JScript runtime error: Object doesn't support this property or method. The childID contains a valid control id and the childCombo variable is set to the correct RadComboBox (the div, actually).
Any ideas why I can't run this function on the RadComboBox? I have also seen this with some of the other functions like RequestItems?
----Javascript functions
function ChildRadComboChange(sender, eventArgs) {
var item = eventArgs.get_item();
ChildRadComboLoad(sender, item);
}
function ChildRadComboLoad(sender, item) {
var childID = ChildRadComboArray[sender.get_id()];
var childCombo = document.getElementById(childID);
childCombo.ClearItems();
if (item.get_index() > 0) {
childCombo.RequestItems(item.get_value(),false);
childCombo.set_text('');}
else {
childCombo.disable();
childcombo.set_text(ChildRadComboArray[sender.get_id()+'_msg']);
}
}
Sincerely,
Sean M. Severson