[jQuery] Problem in success function

[jQuery] Problem in success function

<br clear="all">  $(document).ready(function(){
    $("#txt_airport_code").keyup(function () {
        //var getValue = $("#txtUser").attr("value");
       
        var emailInfo = $("#msg1");
        var airport_code = "airport_code";
        $.ajax({
            type: "POST",
            data: "str="+$("#txt_airport_code").attr("value")+"&code="+airport_code,
            url: "check.php",
            beforeSend: function(){
                emailInfo.html("Checking Email...");
            },
            success: function(data){
                if(data == "ACAT"){
                    emailInfo.html("ACAT Already Exist");
                }else if(data == "ACCT"){
                    emailInfo.html("ACCT Already Exist");
                   
                }else{
                    emailInfo.html("Available");   
                }
            }
        });
    });
  });
 
Hi All ,
This my snippet ,
am doing the already exist functionality ,
The above snippet is working fine ,
but the problem is ,,
Always the condition  goes to the Available , am not able to mark out my Error spot,
Can u tell me , where i made the mistake ,
Thanks advance