xmlhttprequest

AJAX/XMLHttpRequest and Cookies

How do the various popular user agents respond to Set-Cookie headers returned as to response to an XMLHttpRequest? Does the Javascript need to affirm or instruct the user agent to acknowledge that header? ...

Display result of POST or GET to external site within JQuery dialog

Hi, I'm trying to POST to an external website, and display the results in a JQuery UI Dialog on my site. Is that possible? I've tried a bunch of permutations, for example (with GET): $("#view").click(function() { var url = this.href; var dialog_pop = $('<div></div>'); dialog_pop.load(url).dialog(); return false; }); This seems to work...

Find out how long an Ajax request took to complete

What is a good way to find out how long a particular $.ajax() request took? I would like to get this information and then display it on the page somewhere. ANSWER??:::: I'm new to javascript, this is the best that I could come up with if you don't want to inline the "success" function (because it will be a much bigger function) Is ...

What is going wrong with this XHR request in IE8?

I have a photographer's gallery here. In my friends, Firefox and Safari, everything is smooth. However, IE8 seems to not call the callback after the XHR has loaded (if it has, I tried checking with Fiddle, but couldn't get my head around whether it has actually loaded or not). It just seems to sit there loading forever. I'm not sure wh...

JavaScript & XMLHttpRequest

Hello, I know that due to JavaScript security sandbox, it is not possible to load xml data from outside of the domain which the JavaScript code is on. But if I am using the localhost:8080 and the xml document is coming from the localhost in the same machine but from another port like 8081, is this considered as same domain or not? Th...

Same Origin Policy - AJAX & using Public APIs

I know if on my own webpage, if my user is on : http://www.example.com/form.php and I make an ajax request from that page to : http://example.com/responder.php It will fail because of the Same origin policy (subdomain is different). What I am trying to understand is, how is it that AJAX requests can pull data from API's like flickr ...

How to use XMLHttpRequest in Objective-C?

I'm creating easy to use kannada comic reader on mac for my cousins. I'm able to pull the comic pages, but lot of meta content exchanged webpage and server using XMLHttpRequest. I'm finding difficulties use XMLHttpRequest, could anyone tell me how can I use it? ...

XMLHttpRequest works in Adobe Air preview but not compiled app

I've an adobe air app that I've been building using Dreamweaver CS5 as my IDE. When I preview the application everything works perfectly. When I create the app and try and run it the first XMLHttpRequest I run fails. I'm thinking it is a security issue, but I've not clue. I get the 'invalid' password message every time because the...

JS: xmlhttp.status==0 in FF only.

Been stuck on this for the last hour. It was working fine a while ago and I can't tell what's causing it to abort... It works fine in IE and Chrome. Here's my code: http://pastebin.com/Su1y2TTZ Does not get past line 10 in FF, and shows no errors. The getvalue.js file starts on line 125. Need some urgent help... Any ideas? ...

Prevent or handle time out with XmlReader.Create(uri)

Sometimes I am getting a time out exception when reading an XML via a URL. Is there something I can do to prevent this, or is this a problem with the remote server? Below is my simple code: XmlDocument doc = new XmlDocument(); doc.Load(XmlReader.Create(this.RssUrl)); I cam across a post that says KeepAlive may help, but I do not know ...

Failed to override the getResponseHeader method on XMLHttpRequest

I was trying to override the getResponseBody method on XMLHttpRequest object. The code looks so: xhr.onreadyStateChange = function(){ if (xhr.readyState !== 4) { return; } if (xhr.status === 200) { // callback to handle the result } else { var _orig = xhr.getResponseHeader; xhr.getResponse...

"Http channel implementation doesn't support nsIUploadChannel2. An extension has supplied a non-functional http protocol handler"

I'm writing a Firefox extension that uses lots of XMLHttpRequests, following the pattern of the sample code at MDC. Most of the time this works perfectly, but some of the requests are causing the following message to appear in the console: Http channel implementation doesn't support nsIUploadChannel2. An extension has sup...

AJAX: How to use TWO xmlHttpRequest in parallel in ONE function?

How should I do this? function(id,id2){ if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } First Request: xmlhttp.open("GET", "http://example.com/ajax.php?id="+i...

string functions (subStr) not found in XMLHttpRequest event handler

I am have a problem with creating a server push network object. Because Firefox and chrome handle server push differently, (Firefox get onload events, chrome uses onprogress /broken ). For chrome I need to capture the onprogress events and then mask off the previous data from the responseText. I want to pass just the new data to chrome. ...

XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin

I'm developing a page that pulls images from Flickr and Panoramio via jQuery's AJAX support. The Flickr side is working fine, but when I try to $.get(url, callback) from Panoramio, I see an error in Chrome's console: XMLHttpRequest cannot load http://www.panoramio.com/wapi/data/get_photos?v=1&amp;key=dummykey&amp;tag=test&amp;offset...

What charset to use when sending a response to a javascript XMLHTTPRequest 'get' request

I want to send a response to a get request made by the javascript object 'XMLHTTPRequest.' The response content-type will be 'text/plain'. I would like to add a 'charset' to that (i.e. 'Content-Type:text/plain;charset=UTF-8') What encodings does javascript work with natively and what encodings will work with javascript on all browsers...

display xml data in html from an xml file specified within another xml file with xmlhttprequest

Hi, can you help, I have a basic xml file which is displaying well in html. The xml file is as such... <videoList> <video> <pointer> <type><![CDATA[image]]></type> <lat><![CDATA[52.1]]></lat> <long><![CDATA[1.0]]></long> </pointer> <speaker> ...

Logout through XMLHTTPRequest Object is not working in Opera

I am using the basic authentication mechanism for my website in IIS. To logout the user I am using something similar to this JavaScript function: function logoutUser() { setTimeout('location.reload(true)', 1000); xmlhttp = GetXmlHttpObject(); if (xmlhttp==null) { return; } //alert(xmlhttp); var url = "index.php"; xml...

How to hide "page loading"/"transferring data" indicators and spinners caused by loading a (hidden) iframe

Is there any way to suppress the spinners and "transferring data" indicators that browsers show when a web page is loading? I'm loading a document into a hidden iframe that will take a long time (10's of minutes). I don't want/need the user to be aware of this - it's just confusing to them to have the page look like it's still loading....

Why does apache not process multiple requests from the same browser simultaneously

I'm not quite sure how to phrase this question correctly, so I'll start with the scenario I encountered. I have a bit of processing in my web app that takes longer than I'd like the user to wait to have control of the page again, so I decided to have it processed by an ajax request. The problem is, even though I offloaded this reques...