xmlhttprequest

Flash using AJAX or other dynamic data request, what is the current state of the art?

I am doing initial design work for the back end of a site that will use mainly Flash for the front end. I am not a Flash dev myself, and I don't care about general comments for or against Flash. What I want to know is: What is the current state of the art in communicating with the server to use dynamic content? Is AJAX an option? Wha...

How to Load XML File Contents using Javascript?

I'm looking for a way to load an XML file's contents directly into a Javascript variable. Say I have the following directory structure: /index.html /loader.js /file.xml In index.html, there is a <body> tag, whose contents should be replaced with the contents of the XML file. So if the XML file contains: <element> <item>Item One</...

Django, jQuery, XMLHttpResponse error

I'm trying to learn some basic ajax using Django. My simple project is an app that randomly selects a Prize from the available prizes in the database, decrements its quantity, and returns prize.name to the page. I'm using jQuery's $.ajax method to pull this off. The the only thing that's running is the error function defined in my $.a...

xmlHttpRequest Response

Hi Every Body I'm Having Some Confusing Problem And I Need Help I Have Written Some Code To Initialize xmlHttpRequest To Send Request And Recieve Some Response,Here Is My Code: function initRequest(url) { if(window.XMLHttpRequest){ req=new XMLHttpRequest(); } else if(window.ActiveXObject) { isIE=true; ...

Ideas on making cross domain requests from cloud storage

Hi, say you are hosting some .js and html pages up on some providers cloud storage option, amazon, mosso, etc... And I wan't to call a web service from javascript. I'm looking for some ideas on this. Thanks ...

IE8 hangs when more than 4 async XmlHttpRequests are triggered concurrently

for (var i = 0; i < 5; ++i) { var xhr; if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } xhr.open('GET', '/Test/LongOperation?p=' + new Date()); xhr.send(''); } This is only a demo (not live code) but it illustrates the core probl...

Why have "while(1);" in XmlHttpRequest response?

I'm playing firebug with Google Calendar. I happens to find that some XHR request has response like below: while(1);[['us','bW9yZ2FuLmNoZW5nbW9AZ21haWwuY29t 20090320/20090904 63378122163']] It looks like a JSON with prefix dead-loop javascript statements. I'm not sure why Google Calendar has such kind of XHR response. Is there any kn...

How do I alter request parameters before posting XHR action in Ruby On Rails?

I have a form with a list of people with check boxes next to them. Then I have a submit_to_remote which will pass the checked people into the controller for processing. It currently passes checked people in the form: checkbox_name => checkbox_value where checkbox_value is the person_id. This comes from prototype using parameters:For...

What have all the AJAX frameworks to do with AJAX?

With the upcoming rise of AJAX applications on the web, I wrote some own pieces of code to understand what it is about. I know there must be easier ways than directly dealing with the XMLHttpRequest object and thought this is why all the AJAX frameworks were created. However, when I had a look at some of them, I mostly found documentati...

What's an easy way to see what AJAX calls are being made?

I'm looking for something (preferably a Firefox extension) which will allow me to see all AJAX subrequests. Basically, anytime an XMLHTTPRequest() is made, I want to know what URL was being requested and what (if any) GET and POST vars were passed along with it. Unless I'm missing it, I don't see anything quite like this in Firebug or ...

Why is this XMLHttpRequest sample from Mozilla is not working in Firefox 3?

I'm trying to get the sample code from Mozilla that consumes a REST web service to work under Firefox 3.0.10. The following code does NOT work in Firefox but does in IE 8! Why is this not working? Does IE 8 have support for XMLHttpRequest? Most examples I've seen use the ActiveX allocation. What should I be doing? XMLHttpRequest...

How to pass HTTP AUTH values via prototype Ajax.Request()?

Is there any way to pass HTTP AUTH username and password along with an Ajax.request()? Basically, I'm trying to find the equivalent of: curl user:pass http://url.com Is seems this has to be available, but I can't figure it out. If not, is there another JS alternative? ...

How to reduce XMLHttpRequest time lag?

I use a XMLHttpRequest on a signup form to see if the username they entered has been taken already. The script runs fine, but I notice that there's some time delay when making the request - the webpage is frozen for a second, after sending the request. Is there a way to have the request "in the background" and not cause any lag on the f...

Using Google's ClientLogin Interface via XMLHttpRequest in Javascript

I am trying to learn the ClientLogin Interface detailed on the Account Authentication APIs on Google code website. I am using Firefox 3.5pre (Shiretoko) and XMLHttpRequest object in Javascript to follow the process. Here's a stripped down version of what I have: <html> <head> <title>Test</title> <script type="text/javascript"> //<![C...

How to make a Firefox addon listen to xmlhttprequests from a page?

Background I have an existing extension designed to accompany a browser-based game (The extension is mine, the game is not). The extension had been scraping the pages as they came in for the data it needed and making ajax requests for taking any actions. Problem The game developers recently changed a number of actions on the site to use...

How does GGeoXML access cross-domain XML files?

Google Maps's API object GGeoXML is able to access cross-domain XML files (usually KML or GeoRSS). It does not use XmlHttpRequest because it throws the "Access to restricted URI denied" exception (as it's supposed to). Also, it does not use Google's GXmlHttp wrapper because I've tried and it throws the same URI denied exception. So, GGe...

HTTP request and Response

I'd like to make an HTTP request to a remote server and want to get reply back. How can I connect to server and how to read the xml file response. ...

Browser waits for ajax call to complete even after abort has been called (jQuery)

I have some (potentially) long-running ajax calls that I would like to abort if the user navigates to another page. The following jQuery code calls abort on all pending XMLHttpRequest objects upon navigating away from the page: $.ajaxSetup({ beforeSend: function(xhr) { $(window).bind('beforeunload', function() { xhr.abort...

How to display HTML to the browser incrementally over a long period of time?

Do I need to pass back any HTTP headers to tell the browser that my server won't be immediately closing the connection and to display as the HTML is received? Is there anything necessary to get the HTML to incrementally display like flush()? This technique used to be used for things like chat, but I'm thinking about using it for a COMET...

Firefox error 'no element found'

First off, this isn't exactly the ideal way of setting up a page, however there's a need to distribute a script as 1 file. I have a php script at the top of an otherwise xhtml document with javascript, and under certain conditions use XHR to send a query string to the page itself. The php at the top then activates, and stores the passe...