I have a problem that I send a request to a page and when I get the response which is a string something get wrong
This is the code request :
 jQuery.ajax({
     url:'../admin/parsers/check_address.php',
     method:'post',
     data :data,//data that is been requested   
     success:function(data){
         if(data != 'passed'){
             jQuery('#payment-errors').html(data);
         }
         if(data=='passed'){
            alert(data);
         }
     },//this data is which is coming back from response
     error:function(){alert('حدث خطأ ما');},
 });
and this is the code of the response :
echo 'passed';
even though the response contains the string 'passed' but it does not go into the if statement
if(data=='passed'){
                alert(data);
             }
so where is the fault in my code and thank you in advance
 
     
    