This project is archived and is in readonly mode.

#1242 ✓invalid
Andrej Gelenberg

Request fail on local file in firefox 4

Reported by Andrej Gelenberg | June 9th, 2011 @ 06:25 PM

nsIXMLHttpRequest has status 0, so isSuccess return false.
Test file is attached.

Workaround:
isSuccess: function(){

var status = this.status;
return (status == 0) || (status >= 200 && status < 300);
       ^^^^^^^^^^^^^^^^^

},

Comments and changes to this ticket

  • Arian

    Arian June 11th, 2011 @ 03:17 PM

    • State changed from “new” to “invalid”

    Usually it has status 200, it seems to work fine here: http://jsfiddle.net/nrccS/
    Could you give a more detailed example of your case (on jsfiddle)

  • Andrej Gelenberg

    Andrej Gelenberg June 12th, 2011 @ 01:57 PM

    I develop my scripts without server. So to reproduce save the attached test.html on your machine and open it with firefox or chrome. It works on Firefox 4 and Chromium 12 under linux.

    There is no server and no HTML-response with an valid code.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Attachments

Pages