modules/raptor_glue/js/formHelper.js
/**
 * Hide the entire comment panel if the wrong radio is checked.
 */
Hide the entire comment panel if the wrong radio is checked.
Hide the entire comment panel if the wrong radio is checked .
function manageChecklistQuestionCommentByName(sRadioValue,sShowOnValues,sCommentBoxName)
{
    var sFind = "["+sRadioValue+"]";
    var nPos = sShowOnValues.indexOf(sFind);
    var oTB=document.getElementsByName(sCommentBoxName);
    var oWrapper=document.getElementsByName(sCommentBoxName+'-wrapper');
    if(nPos > -1 || oTB[0].value > '')
    {
        oWrapper[0].style.display = 'inline';
    } else {
        oWrapper[0].style.display = 'none';
    }
}
function manageChecklistQuestionCommentByName ( sRadioValue , sShowOnValues , sCommentBoxName ) { var sFind = "[" + sRadioValue + "]" ; var nPos = sShowOnValues . indexOf ( sFind ) ; var oTB = document . getElementsByName ( sCommentBoxName ) ; var oWrapper = document . getElementsByName ( sCommentBoxName + '-wrapper' ) ; if ( nPos > - 1 || oTB [ 0 ] . value > '' ) { oWrapper [ 0 ] . style . display = 'inline' ; } else { oWrapper [ 0 ] . style . display = 'none' ; } }
Hide the entire comment panel if the wrong radio is checked.
Hide the entire comment panel if the wrong radio is checked .
//alert('START NOW checklist manage inputs>>>['+sRadioValue+'] showOnValues=('+sShowOnValues+') ('+sCommentBoxName+')'); //Show the comment box. //Do NOT show the comment box. //alert('DONE NOW checklist manage inputs>>>['+sRadioValue+'] showOnValues=('+sShowOnValues+') ('+sCommentBoxName+')>>> style>>>'+oWrapper[0].style.display);