vendredi 29 juillet 2016

Simple If else unable to get work

I have two textbox named txtA,txtB

var count;//which needs to be compared with BValue
var AValue = $("#txtA").val();
var BValue = $("#txtB").val();

 if ($("AValue  == "") {
            alert("Enter AValue and continue");
        } else if (BValue  == "") {
            alert("Enter To BValue and continue");
        } else if (AValue  > BValue ) {
            alert("AValue should be lesser than To BValue");
        } else if (AValue == "" || BValue == "") {
            alert("Please enter the AValue and BValue to continue");
        } else if (AValue == "0") {
            alert("Invalid AValue");
        } else if (BValue  > pagecount) {
            alert("Invalid To Page Number");
        } else {
             // do some operations here
        }

All the conditions are passing well but this BValue > count is triggering me though it satisfy the conditions

Aucun commentaire:

Enregistrer un commentaire