Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8262911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:55:04+00:00 2026-06-08T03:55:04+00:00

The below ajax success function is displaying only my last error4 msg. The responses

  • 0

The below ajax success function is displaying only my last error4 msg. The responses I am checking are coming ok but the message is not displaying.

$.ajax({
    type:...
    url :...
    data:...
success: function (exst_rsp) {
//if email is not register
    if (exst_rsp == "email_no") {
        exstInfo.text("error1");
        exstInfo.addClass("error");
        email_err = true;
    }
    else {
        exstInfo.text("");
        exstInfo.removeClass("error");
        email_err = false;
    }

//if user has already submit a coupon
    if (exst_rsp == "played") {
        couponInfo.text("error2");
        couponInfo.addClass("error");
        email_pl_err = true;
    }
    else {
        couponInfo.text("");
        couponInfo.removeClass("error");
        email_pl_err = false;
    }

//if email & pass don't match
    if (exst_rsp == "email_pass_no") {
        matchInfo.text("error3");
        matchInfo.addClass("error");
        pass_err = true;
    }
    else {
        matchInfo.text("");
        matchInfo.removeClass("error");
        pass_err = false;
    }

//if captcha don't match
    if (exst_rsp == "wrong") {
        capthInfo.text("error4");
        capthInfo.addClass("error");
        captcha_err = true;
    }
    else {
        capthInfo.text("");
        capthInfo.removeClass("error");
        captcha_err = false;
    }

    if (exst_rsp == "ok") {
        exst_rsp_ok = false;
        $('#content').load('f.php');
    }
    else {
        exst_rsp_ok = true;
    }
    if (email_reg_err == true || email_pl_err == true || email_pass_err == true || captcha_err == true || exst_rsp_ok == true) {
        return false;
    }
    else {
        return true;
    }
}
})
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:55:08+00:00Added an answer on June 8, 2026 at 3:55 am

    Mistake was that I was useing the same IDs to display errors. Code Corrected.

    And is working fine!

    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I using jQuery Ajax like below: $.ajax({ url: 'servlet/*****Servlet', dataType: text, success: function(data) {
Below is the code where it is displaying the delete message but it is
on $(document).ready(function() in index.php, the below AJAX is executed, running the file getData.php: if
I did ajax call and got response in callback function like below: var v=;
I have JavaScript of ajax uploader as below; $(document).ready(function(){ var qwerty = $('#qwerty').val(); $('#demo1').ajaxupload({
I am using the below jquery code to call a ajax function in my
In the code example below the success callback function logs 'input#04.update' four times rather
I want the check_membership() function below to return the AJAX data. However, result keeps
The excerpt below is part of a .ajax() function I'm using to pull data
I'm running into an issue with a jquery ajax function not properly returning its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.