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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:09:11+00:00 2026-06-01T13:09:11+00:00

I’m submitting a form using an ajax request (POST method), and checking the HTTP

  • 0

I’m submitting a form using an ajax request (POST method), and checking the HTTP status code on the response to see if it was successful or not.

It works fine on Firefox, but of course doesn’t on MSIE-8. The submission actually works fine, I can check my server and confirm that the submission worked and the server responded with a status code of 204. Again, firefox correctly gives me the status code of 204 from the request object, but IE gives a status code of 1223.

Any ideas how I can get an accurate status code in MSIE? The code that submits the form and checks the response is below.

    var req = new XMLHttpRequest();
    req.open("POST", "p.php?i=" + self.__isid, true);
    //Send the proper header information along with the request
    req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    req.setRequestHeader("Content-length", formdata.length);
    req.setRequestHeader("Connection", "close");

    req.onreadystatechange = function()
    {
        if(req.readyState == 4)
        {
            if(req.status == 204 || req.status == 200)
            {
                //Success. Update the feed.
                self.__postFeed.update();
                self.__form.reset();
            }
            else
            {
                //TODO: Better error handling.
                alert("Error submitting post:\n" + req.responseText);
            }
        }
    }
    req.send(formdata);
  • 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-01T13:09:12+00:00Added an answer on June 1, 2026 at 1:09 pm

    XMLHTTPRequest implementation in MSXML HTTP (at
    least in IE 8.0 on Windows XP SP3+) does not handle HTTP responses
    with status code 204 (No Content) properly; the `status’ property has
    the value 1223.

    This is a known bug and most of the javascript based frameworks handle this situation and normalizes 1223 to 204 in IE

    So the solution to your problem would be like this

    // Normalize IE's response to HTTP 204 when Win error 1223.
    status : (conn.status == 1223) ? 204 : conn.status,
    // Normalize IE's statusText to "No Content" instead of "Unknown".
    statusText : (conn.status == 1223) ? "No Content" : conn.statusText
    

    Reference:

    dojo – http://trac.dojotoolkit.org/ticket/2418

    prototype – https://prototype.lighthouseapp.com/projects/8886/tickets/129-ie-mangles-http-response-status-code-204-to-1223

    YUI – http://developer.yahoo.com/yui/docs/connection.js.html (handleTransactionResponse)

    JQuery – http://bugs.jquery.com/ticket/1450

    ExtJS – http://www.sencha.com/forum/showthread.php?85908-FIXED-732-Ext-doesn-t-normalize-IE-s-crazy-HTTP-status-code-1223

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.