The form I have contains a radio button, a listbox and an embedded view.
The embedded view sets it’s single category according to the value of the listbox, which alters it’s values depending on the value of the radio button.
This works fine, except that when I change the value of the radio button I try and set the value of the listbox at the same time but the value doesn’t actually exist on the document itself, so the embedded view shows ‘No Documents Found’. The listbox looks right, but must just display the first value in it’s list.
I’m trying to change the values on the OnChange of the radio button, which is also where I do a manual refresh.
The code I’m using is:
//get the value of RSSMainOptions, and change the value of the RSSOptions depending on it
radioField = document.forms[0].RSSMainOptions;
rLen = radioField.length;
for (i=0;i<rLen;i++) {
if (radioField[i].checked) {
radioVal = radioField[i].value;
}
}
if (radioVal ==“X”) {
alert (‘value is X’);
document.forms[0].RSSOptions.selectedIndex = 0;
}
_doClick(‘$Refresh’,this,null);
radioVal is set to X, and the alert prompts (i’ve taken it out as well, just in case it was something to do with that), but the value of the listbox is simply not set (checked on the page source).
Am I doing something fundamentally wrong, I’m fairly new to web design?
Cheers
Dan