Why exist is not determined?

Why exist is not determined?

Hi,

I am using this code to signup a user and check if the user exists.

When I enter an exists user my PHO correctly returns "exist" but my jquery is showing it in a normal alert not the DevExpress alert as if it's an error 

is there any issue in my if (data == "exist")

this is my code:

  1. $.ajax({
  2.     type: "POST",
  3.     url: 'https://www.mydomain.com/ws/signin_user.php',
  4.     async: true,
  5.     data: formData,
  6.     dataType: "json",
  7.     processData: false,
  8.     contentType: false,
  9.     success: function (data) {
  10.         $("#loadPanelSignup").dxLoadPanel("instance").option("visible", false);

  11.         if (data == "exist") {
  12.             DevExpress.ui.dialog.alert('The email address already exist!', 'Attention').done(function () {
  13.                 return;
  14.             });
  15.         }
  16.         else {
  17.             DevExpress.ui.dialog.alert('We have sent you an email.', 'Thank you').done(function () {
  18.                 XoomPage.app.navigate({ view: "activate", user_id: data.UserDetails[0].user_id, user_guid: data.UserDetails[0].user_guid, activation_guid: data.UserDetails[0].activation_guid, activation_check_guid: data.UserDetails[0].activation_check_guid, email_address: data.UserDetails[0].email_address }, { root: true });
  19.             });
  20.         }
  21.     },
  22.     error: function (xhr, status, error) {
  23.         alert(xhr.responseText);
  24.     }
  25. });

Thanks,