Hi
I have 3-level dynamic dependent drop down boxes that are all read from mysql and than 2nd and 3rd level's .style.display are set to 'none'
So I do not know how to pass Option Select (drop down box) value and use it as a name for an object with style.display property
Below i some code
<SELECT onChange="Change(this)">...
Below is script function (txt should return 2nd-level select name)
function Change(theSelect){
txt = theSelect.options[theSelect.selectedIndex].text;
if (txt.style.display=='none'){
txt.style.display='';
}
else{
txt.style.disply='none';
}
JavaScript Error message is 'txt.style.display' is null or not an object. I think here are some variable type issuses but cannot figure which. Finnaly, when I change txt with one of 2nd-level select names script works -
Thanks
Marko