Hide form elements that show through the search form when it is visible - Node.js HTML

Node.js examples for HTML:Element

Description

Hide form elements that show through the search form when it is visible

Demo Code


function toggleForm(frmObj, iState) // 1 visible, 0 hidden 
{
    for(var i = 0; i < frmObj.length; i++) {
        if (frmObj.elements[i].type.indexOf("select") == 0 || frmObj.elements[i].type.indexOf("checkbox") == 0) {
            frmObj.elements[i].style.visibility = iState ? "visible" : "hidden";
        }/*from  w w w  .j av  a  2s  .  co m*/
    } 
}

Related Tutorials