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 8476181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:06:33+00:00 2026-06-10T18:06:33+00:00

In the following code I’m getting ‘TypeError: response is null’ in Firebug. I’ve tried

  • 0

In the following code I’m getting ‘TypeError: response is null’ in Firebug. I’ve tried many combinations and ways of trying to get the response but with no success. Please have a look and tell me what I’m doing wrong. Thanks!

$("a.logmein").colorbox({ width:"540", height:"420", href:function(){ return this.href + " #login"; }, onComplete: function(){
     $("#formLoginUser").submit(function(){
         $.ajax({
          data: $(this).serialize(),
          type: "POST",
          url: $(this).attr('action'),

          success: function(response) {
            if(response.status == 'fail'){
              $("#notifications").removeClass().addClass('ajaxerror').html(response.message).show();
            } else {
              $("#notifications").removeClass().addClass('ajaxsuccess').html(response.message).show();
            }
            console.log(response);

          },
          error: function (xhr, textStatus, errorThrown) {
            $("#notifications").addClass('ajaxsuccess').html(xhr.responseText).show();
          }
        });
return false;
    });
 }});

ajax.php:

header("Content-Type:application/json"); 

    switch($_REQUEST['action']){
        case('formLoginUser'):      $afm = $_POST['afm'];
                                    $password = $_POST['password'];

                                    $query_finduser = sprintf("SELECT * FROM clients WHERE clientafm=%s and clientcode=%s and expires>%s",
                                                                   GetSQLValueString($afm, "text"),
                                                                   GetSQLValueString($password, "int"),
                                                                   GetSQLValueString(strtotime('now'), "int"));
                                    $finduser = mysql_query($query_finduser, $connection) or die(mysql_error());
                                    $row_finduser = mysql_fetch_assoc($finduser);
                                    $totalRows_finduser = mysql_num_rows($finduser); 

                                    if($totalRows_finduser==0) {
                                        echo json_encode(array("status"=>"fail", "message"=>"Login failed. Please retry"));
                                    } else {    

                                        echo json_encode(array("status"=>"success", "message"=>"Login successful!"));
                                    } 
                                    break;

    default:                    break;

}//switch end
  • 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-10T18:06:34+00:00Added an answer on June 10, 2026 at 6:06 pm

    Due jQuery docs success callback function has 3 input parameters: success(data, textStatus, jqXHR). What about the rest of parameters? Try to inspect them. Maybe error is in there.

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

Sidebar

Related Questions

Following code iterates through many data-rows, calcs some score per row and then sorts
following code: // also tried function getDeletedDates() var getDeletedDates = function() { var s
Following code is used to get images from particular folder but how to get
Following code, credit: Guffa. Hello All, I'm trying to add controls to a Form
Following code is simplified version of the code that I am trying to optimize.
Following code generates a CA2000 warning: Myclass myclass = null; try { myclass =
Following code, doesn't get triggered when Esc is pressed. Can somebody give me insight?
Following code if (_LastMouseClickArea != null) { if (_LastMouseClickArea.GridItem == GridItem.DataCell) {... fails because
Following code produces a nested array as a result for keys containing three items:
Following code takes like 2500 milliseconds on an i7-*3.4 GHz windows-7 64-bit computer to

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.