Hi,
I have one rad combo box. I have to fill it with options array in java script.Here is code.
I am using one function for adding options to combo box.here is the function .
function addOption(selectbox, text, value) {
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
And I am looping and adding options to combobox.
for (var i = 0; i < strArray.length; i++) {
addOption($find("<%= SavedPresetMenu.ClientID %>"), strArray1[i], strArray[i]);
}
Here SavedPresetMenu is rad combobox Id.In the above function I am getting one javascript error.
selectbox.options is undefined.And if I clear options array also getting same error.
$find("<%= SavedPresetMenu.ClientID %>").options.length = 0;
In this line also getting same error. How to use rad combobox in this situation.
Any ideas, suggestions would be greatly appreciated.
Thanks,
Bhagath.