853 bytes, text/html
1.44 KB, text/html
22 bytes, text/plain
22 bytes, application/x-httpd-php-source
Calls test.php (uses POST method, required a PHP file on this server)
Attachment #198965 - Attachment mime type: application/octet-stream → application/x-httpd-php-source
Taken from http://developer.mozilla.org/en/docs/AJAX:Getting_Started#Step_3_.E2.80.93_.22All_together_now.21.22_-_A_Simple_Example as an example of known good code
File 198965 was wrong file - uploaded in error!
Attachment #198965 - Attachment is obsolete: true
I have a feeling this has something to do with how you're serving (or not having a doctype or something in) text.txt.
Assignee: nobody → xml
Product: Firefox → Core
Version: unspecified → Trunk
Thanks Jesse - I've created a couple of text cases where XML datatypes are not overridden or set, (using text/plain instead). The error does not arise in this case, in either Firefox 1.5b2 or 1.06 - http://gene.sentinel3.phase.org/ajax2.html http://gene.sentinel3.phase.org/nsajax2.html This may mean that this is notabug in Firefox, but in the vast majority of AJAX documentation online. I'll see what I can do about contacting people in charge of such documentation.
I suspect this was done partly because it was easy to both pump data into the parser and to stash in in our responseText. But it also has the side benefit that once an async XMLHttpRequest is done, getting the responseXML doesn't freeze up while it tries to parse the whole thing. Some data on how often people do or don't want the responseXML would also help here. If they usually want it, parsing eagerly is the way to go.
*** Bug 322120 has been marked as a duplicate of this bug. ***
This is invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
*** Bug 342137 has been marked as a duplicate of this bug. ***
can you try please with this : in text.txt ===> Test lève épaules ümläutö rêve ? you can test it here : http://maroc.flash.free.fr/httprequest_test.html
Just in case some else hits this... If you execute a XHR from a file URL, the MIME mapping is different than a server URL. https://developer.mozilla.org/En/How_Mozilla_determines_MIME_Types#ExternalHelperAppService So JS applications that work perfectly fine from a server generate the subject error message when run from the file system. In our specific case we tried to load a dojo app from the filesystem for a test suite. Every dojo file load (lots of them) gives the error message. To overcome this problem you have to explicitly set the MIME type req.overrideMimeType('text/plain');
You need to log in before you can comment on or make changes to this bug.