PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, September 6, 2022

[FIXED] What are the possible values for `jqXHR.status`?

 September 06, 2022     ajax, http, javascript, jquery     No comments   

Issue

What are the possible values for jqXHR.status?

So far, I can see the following:

if (jqXHR.status === 0) { msg = 'Network Problem'; }
else if (jqXHR.status == 404) { msg = 'Requested page not found. [404]'; }
else if (jqXHR.status == 500) { msg = 'Internal Server Error [500].'; }

Solution

It can be anything found here.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

The status value is the HTTP protocol status field that http servers send on the response.

Note at this point, the jquery ajax documentation indicates that status is deprecated, and you should use statusCode instead.



Answered By - hvgotcodes
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,213,839

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing