stirnpanzer
Programmer
hi,
i have a combobox with a "OnChange" event...
What i am attempting to do is set, div id 'night' = Block or None
if the selection = "Accomodation" , i am getting "Object Required" after the //Fails here.......
What am i doing wrong ????????
var f = document.forms[0];
var x;
x = (f.PerferredAirline1.options[f.PerferredAirline1.options.selectedIndex].text);
if(x=='Accomodation') {
alert("if");
//fails here ...........
document.getElementById('night').style.display='none';
}else{
alert("else");
//fails here ...........
document.getElementById('night').style.display='block';
}
i have a combobox with a "OnChange" event...
What i am attempting to do is set, div id 'night' = Block or None
if the selection = "Accomodation" , i am getting "Object Required" after the //Fails here.......
What am i doing wrong ????????
var f = document.forms[0];
var x;
x = (f.PerferredAirline1.options[f.PerferredAirline1.options.selectedIndex].text);
if(x=='Accomodation') {
alert("if");
//fails here ...........
document.getElementById('night').style.display='none';
}else{
alert("else");
//fails here ...........
document.getElementById('night').style.display='block';
}