xhr

how to receive XML in IE8 with mootools

I'm doing a web where I heavily use AJAX requests to a XML service. In fact, my web is a front-end with almost no server whatsoever and uses AJAX to communicate with the back-end. Everything was going fine (I developed and tested in Ubuntu 9.04 and Firefox 3.0 as a browser). One day I decided to see how my web did in IE8... horror! Not...

[Dojo / PHP + apc.rfc1867] I can't get xhrPost upon form submission via input button, I'm going insane...

It's rather lengthy, TLDR version below crit wall of text. Setup: Our company had been using prototype for some time, and just recently switched to dojo. I have been converting lots and lots of JS and setting everything back up to normal and then I encountered this issue... The issue: I have a typical form set up with a upload file fi...

MooTools: Parsing Ajax responseTree

I have an Ajax request to an XML document. The XML document is an RSS feed. Here's my onSuccess for the request: onSuccess: function(responseTree) { // process <item> elements } How do I enumerate <item> elements and retrieve the various child values? ...

XMLHttp long polling and avast blocking

I am experimenting with long polling XMLHttp Requests (XHR) on this page. Having Avast antivirus installed I noticed that its web shield effectively blocks the use of readyStates<4. Adding an exception for text/xml mime types in the web shield configuration solves this. But is there a way to solve this programmatically? I searched the n...

how to handle AJAX session_out with jquery?

I think it's a common problem but I can't find any solution about this. For example: I'm building a AJAX Web system using Jquery(client js) and php(server side). All the ajax requests are sent to index.php, which checks if that session is valid or not. If the session is not valid, server side's php will output the login page; if the sess...

Trouble intercepting AJAX (XHR) requests from GreaseMonkey script

My userscript's task is fairly simple -to listen to XHR requests via an XHR bridge sort of functionality, manipulate the data received, and return it back. Everything happening transparently, of course. I came across this reply (http://stackoverflow.com/questions/629671/how-can-i-intercept-xmlhttprequests-from-a-greasemonkey-script/6297...

jQuery load() throws "permission denied" error in IE

Hi, I'm loading a page through AJAX with jQuery's load() function. It doesn't work in IE8, giving the "permission denied" error. Using the IE debugger, it seems that when jQuery tries to open up the xhr, ie blocks it. The problem is, my page has a javascript src that points to bing maps js api (which of course is in a completely diffe...

Create Firefox Addon to Watch and modify XHR requests & reponses

Update: I guess the subject gave a wrong notion that I'm looking for an existing addon. This is a custom problem and I do NOT want an existing solution. I wish to WRITE (or more appropriately, modify and existing) Addon. Here's my requirement: -> I want my addon to work for a particular site only -> The data on the pages are encoded us...

Javascript Dojo AJAX (XHR) Requests with Custom Headers in Firefox

I'm trying to make a request using dojo.xhrGet to grab some XML data from a server. I'm using dojo 1.4.0. The server requires that I pass credentials through a custom HTTP header called Myauthtoken. Everything works fine in Safari. The code pops up a dialog showing [object Document]. But in Firefox, the dialog shows null. Somewhere ...

msxml XMLHTTP for large json object works very slow on IE8 and quite good on Firefox - why?

Hi, I am creating an XMLHTTP object in Firefox and IE8 and i transfer a very large amount of data (json). In Firefox it renders it in 5 seconds, in IE8 it takes 30 seconds. Is there any way to make IE8 XMLHTTP works faster? Here is my code for creating the XHR object: function createRequestObject2() { var http_request = false; if(win...

Firebug 1.5 showing 200 Aborted for Ajax requests

When I'm using Firebug 1.5, I'm getting 200 ABORTED errors on certain ajax requests. You can see this happen on this demo page by typing into the textfield. The functionality of the site seems to work just fine even with these errors. Is it safe to simply ignore these errors? This wicket mailing list thread seems to indicate that the ...

xhrPost getting 404 in IE, working fine in FF

EDIT: I'm wondering if it could have to do with the fact that the url I'm trying to connect to has a # in it. I saw some other posts in my google search for this issue, and some people had a problem with that, but I think that was in jQuery. Here's an example url: /wps/myportal/!ut/p/c5/04_SB8K8xLLM9MSSzPy8xBz9CP0os3jLwABLU1dTEwMLQyMz...

Query Wikipedia's API using AJAX (XMLHttpRequest)

I am trying to implement a simple request to Wikipedia's API using AJAX (XMLHttpRequest). If I type the url in the address bar of Firefox, I get a neat XML, no sweat there. Yet, calling the exact same url with: // this is my XMLHttpRequest object httpObjectMain.open("GET", "http://en.wikipedia.org/w/api.php?action=query&amp;format=xml&...

Obtain the method and url from an XHR

Basically what the title says, I want to get the URL and HTTP Verb from a xhr. Is this possible? ...

JSON Feed Appears to be XHR when it should be JS

I don't get why it'd doing this with the 2nd feed (appearing as a XHR call rather than just JS [looking at it in Firefox/Firebug]). The 2nd feed has the exact same MIME type as Flickr's JSON feed, yet the PortlandOregon.gov one shows as XHR and i get a NULL callback when using $.getJSON and if i use $.ajax with a 'json' or 'jsonp' type i...

Firefox redirect response on xhr request

Suppose we have the xhr 'POST' request that returns 'redirect' status code. In that case browser is sending additional xhr 'GET' by the given URL. I am not sure who is doing that call chain: browser itself or js library(using MooTools). The problem is that the second 'GET' request is not recognized as xhr by the server: It doesn't have...

In XMLHttpRequest, where is error flag variable?

In the XMLHttpRequest Spec it says that: The DONE state has an associated error flag that indicates some type of network error or abortion. It can be either true or false and has an initial value of false. Also says something similar about a "send() flag" in an "OPENED" state. It's said in the specification but not in the ...

Cross-Origin Resource Sharing (CORS) - am I missing something here?

I was reading about CORS (https://developer.mozilla.org/en/HTTP_access_control) and I think the implementation is both simple and effective. However, unless I'm missing something, I think there's a big part missing from the spec. As I understand, it's the foreign site that decides, based on the origin of the request (and optionally incl...

WebKit "Refused to set unsafe header 'content-length'"

I am trying to implement simple xhr abstraction, and am getting this warning when trying to set the headers for a POST. I think it might have something to do with setting the headers in a separate js file, because when i set them in the <script> tag in the .html file, it worked fine. The POST request is working fine, but I get this war...

Loading a file from the browser, without a web server

So I need to load a file from disk somehow, and access its contents.. Sort of like how <link rel="stylesheet"> works. Is there a way to do this? XHR requires a web server.. and using something like the above doesn't let me access the contents of the file.. ...