D
Daniel
Hello,
I am trying to make a simple function to hide or not a field based on
the selection made in a select input.
The following will work fine.
function enableAIBQ(EleName,EleVal)
{
if (EleVal != 1)
alert ("No");
else
alert ("Yes");
document.usrsel["IaibqNo"].style.visibility = "visible";
document.usrsel["IaibqNo"].focus();
}
However when I add in one line it stops working altogether???
function enableAIBQ(EleName,EleVal)
{
if (EleVal != 1)
alert ("No");
document.usrsel["IaibqNo"].style.visibility = "hidden";
else
alert ("Yes");
document.usrsel["IaibqNo"].style.visibility = "visible";
document.usrsel["IaibqNo"].focus();
}
Could someone show me my mistake or propose a solution.
Thank you
Daniel
I am trying to make a simple function to hide or not a field based on
the selection made in a select input.
The following will work fine.
function enableAIBQ(EleName,EleVal)
{
if (EleVal != 1)
alert ("No");
else
alert ("Yes");
document.usrsel["IaibqNo"].style.visibility = "visible";
document.usrsel["IaibqNo"].focus();
}
However when I add in one line it stops working altogether???
function enableAIBQ(EleName,EleVal)
{
if (EleVal != 1)
alert ("No");
document.usrsel["IaibqNo"].style.visibility = "hidden";
else
alert ("Yes");
document.usrsel["IaibqNo"].style.visibility = "visible";
document.usrsel["IaibqNo"].focus();
}
Could someone show me my mistake or propose a solution.
Thank you
Daniel