M
Michael
Hello!
I have a problem accessing the value of selected option. It works fine
if i put fixed name of select box, but not if the name is variable.
Can anyone help me with it?
function sel(name){
var p = 'prefix_'+name; // name is string like id0 or id1 and so on
var list = document.forms[0].p; //here fails the script in firefox,
because it cannot evaluate p as name of select box
var zonename = list.options[list.selectedIndex].value;
}
Thanks!
I have a problem accessing the value of selected option. It works fine
if i put fixed name of select box, but not if the name is variable.
Can anyone help me with it?
function sel(name){
var p = 'prefix_'+name; // name is string like id0 or id1 and so on
var list = document.forms[0].p; //here fails the script in firefox,
because it cannot evaluate p as name of select box
var zonename = list.options[list.selectedIndex].value;
}
Thanks!