mercredi 7 octobre 2015

Else statement does not execute

can anyone help me understand why the "else" portion of this code does not execute? When the variables equal each other , the alert box appears, when the variables are not the same the else portion does not execute, But if i edit out all, and leave the else portion of code it works

$(document).on("click","."+deletebutton,function(){
    var id = $(this).attr("id");
    if(id){

        if(name1 == p_name){
            alert("I am an alert box!");
        }
        else{
            if(confirm("A League Fee of 14% will be deducted from each players bet amount. This fee is non refundable after you accept. Do you really want to Accept this Match ?"))
            ajax("rid="+id,"del");
        }
    }
});

Aucun commentaire:

Enregistrer un commentaire