0

I have a code here that successfully alerts "Success" from the echo of submit.php.

var result = $.ajax({
             type: "POST",
             url: "ajax/submit.php",
             datatype: "html",
             data: "&data="+$_employmentBackground,
             async: false
            }).responseText;

alert(result);

but when I put if statement around, it is not working anymore..

if(result == "Success")
{
   alert(result);
}

Do you have any idea why is it not working?

QKWS
  • 1,069
  • 9
  • 22
  • 41

0 Answers0