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:
- $.ajax({
- type: "POST",
- url: 'https://www.mydomain.com/ws/signin_user.php',
- async: true,
- data: formData,
- dataType: "json",
- processData: false,
- contentType: false,
- success: function (data) {
- $("#loadPanelSignup").dxLoadPanel("instance").option("visible", false);
- if (data == "exist") {
- DevExpress.ui.dialog.alert('The email address already exist!', 'Attention').done(function () {
- return;
- });
- }
- else {
- DevExpress.ui.dialog.alert('We have sent you an email.', 'Thank you').done(function () {
- 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 });
- });
- }
- },
- error: function (xhr, status, error) {
- alert(xhr.responseText);
- }
- });
Thanks,