mardi 19 janvier 2016

How to make date for one option "not needed" when it's needed for all other

Well I have program that has many option in dropdown menu, and they all must have values from-date and to-date. Now I need to write one option that can have/or not need date values. If there is no date values that option gives back all values from DB. The problem is in JS...

Code is for now something like this, maybe all the way wrong :-)

function validateFields () { with (thisForm) { if (!checkProd(prod)) return false;

    if( prod == jspRes.LITBINISUF0026 ) { //call from another js var with saved name of option
        if (frmdate.value == "")  
        {
                ???
            if (!fnIsValidDate(frmdate))   
            {
                    ???
            }               
        }
    } else {
    // after this i think to put all other options that must have from and to-date

Aucun commentaire:

Enregistrer un commentaire