xmlhttprequest

Can you reliably set or delete a cookie during the server side processing of an Ajax (XHR) call?

I have done a bit of testing on this myself (During the server side processing of a DWR Framework Ajax request handler to be exact) and it seems you CAN successfully manipulate cookies, but this goes against much that I have read on Ajax best practices and how browsers interpret the response from an XmlHttpRequest. Note I have tested on...

Updating server-side progress on Rails application

I want to upload and then process a file in a Ruby on Rails app. The file upload is usually quite short, but the server-side processing can take some time (more than 20 seconds) so I want to give the user some indicator - something better than a meaningless 'processing...' screen. I'm trying to use the following code in the view <%= p...

Max length of send() data param on XMLHttpRequest Post

Is there a documented max to the length of the string data you can use in the send method of an XMLHttpRequest for the major browser implementations? I am running into an issue with a JavaScript XMLHttpRequest Post failing in FireFox 3 when the data is over approx 3k. I was assuming the Post would behave the same as a conventional Form ...

Monitoring a server-side process on Rails application using AJAX XMLHttpRequest

I'm using the following in the web page but can't get a response from the server while it's processing <script type="text/javascript"> <!-- function updateProgress() { //alert('Hello'); new Ajax.Request('/fmfiles/progress_monitor', { parameters: 'authenticity_token=' + encodeURIComponent(AUTH_TOKEN), onS...

How do I make a JavaScript call to a WCF service hosted on a different domain?

We are designing a web application using ASP.NET and AJAX and we want to host our WCF Service Layer on a different website and make JavaScript calls to the Service Layer from our client pages. We understand that the browser will not allow AJAX calls to a different port or domain. What is the best way to architect a solution? We are co...

XMLHttpRequest POST multipart/form-data

I want to use XMLHttpRequest in JavaScript to POST a form that includes a file type input element so that I can avoid page refresh and get useful XML back. I can submit the form without page refresh, using JavaScript to set the target attribute on the form to an iframe for MSIE or an object for Mozilla, but this has two problems. The mi...

What are the disadvantages to using a PHP proxy to bypass the same-origin policy for XMLHttpRequest?

http://developer.yahoo.com/javascript/howto-proxy.html Are there disadvantages to this technique? The advantage is obvious, that you can use a proxy to get XML or JavaScript on another domain with XMLHttpRequest without running into same-origin restrictions. However, I do not hear about disadvantages over other methods -- are there, and...

Differentiating Between an AJAX Call / Browser Request

Is there anything in the header of an HTTP request that would allow me to differentiate between an AJAX call and a direct browser request from a given client? Are the user agent strings usually the same regardless? ...

Prevent redirection of Xmlhttprequest

Is it possible to prevent the browser from following redirects when sending XMLHttpRequest-s (i.e. to get the redirect status code back and handle it myself)? ...

Looking for a generic XMLrequest and data extraction script

Hello, I am also looking for a Python script to do the following: Send an http request to a remote geodata server and read the data into our existing Python geoprocessing scripts. Is there a generic script available so that I can customise it for the project in hand? Sincerely, David ...

XMLHTTP POST request and System.Reflection

I have a DTS job that is using the MSXML2.XMLHTTP3.0 object to generate a post request to an ASP.NET application. Under the covers, the ASP.NET application is using System.Reflection to acquire some assembly information and I receive the following exception: System.Web.HttpException Error Code: -2147467259 Message Session state ca...

Differences on how XmlHttpRequest behaves with different browsers?

I am trying to see what are the gotchas in using XmlHttpWebRequest such that it works for Safari, Firefox and IE? ...

Jquery how to get attribute from a HttpServletRequest

Hello all: I have this piece of code: $("#faq").click(function () { var url = $.get("faq", { pagina: "page" }); alert(url); }); On "faq" responds to a Servlet that sets an attribute on the request .... request.setAttribute("pageFAQ", pageFAQ); .... After the get jqeury prints [object XmlHttpRequest]. I would lik...

Best practice for detecting AJAX/XmlHttpRequestSupport

I am trying to update an old JavaScript function used to detect support for AJAX (i.e. the XmlHttpRequest object). I've looked online (including SO) and found various solutions but I'm not sure which is the most efficient for simply detecting support. The current function is: function IsSyncAJAXSupported() { var isSyncAJAXSuppor...

Can I make an XMLHttpRequest to another domain?

Is there a way to use XMLHttpRequest in combination with other domains? I would like to parse some xml from Google without having to use a server so it is minimalistically complex to run. var req = getXmlHttpRequestObject(); ... req.open('GET', 'http://www.google.de/ig/api?weather=Braunschweig', true); req.setRequestHeader("Con...

HTTP HEAD Request in Javascript/Ajax?

Is it possible to do a HTTP Head request solely using an XMLHTTPRequest in JavaScript? My motivation is to conserve bandwidth. If not, is it possible to fake it? ...

Does IE6 support XMLHttpRequest.abort()?

Am I correct to understand that the abort() method for XMLHttpRequest objects is only available starting from MSIE 7? If so, what equivalent option do I have for aborting an XMLHttpRequest object on timeout in MSIE 6? Using a JS framework to abstract the problem away is not an option at this time I'm afraid :(. I'm on a legacy system th...

Permission Denied When using XMLHttpRequest.Open cross browser access

I am trying to access XMLHTTPRequest.open Method I have even included netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); but still its not working. I am using javascript and HTML to access the WebService. Any Help would be really great Code <html> <Head> <Title>Calling A WebService from HTML </Titl...

Permission Denied Error XMLHttpRequest

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title>Calling a Web Service Using XmlHttpRequest</title> <script type="text/javascript" language="javascript"> var xmlhttp; var XMLConten...

Is there ANY way to suppress the browser's login prompt on 401 response when using XmlHttpRequest

I am using jQuert .ajax function to call a page method. The site is using FormsAuthentication. So when an authentication ticket expires a call to the page method will obviously cause a redirect to the login page. Now, the geniuses that wrote the System.Web.Handlers.ScriptModule decided that if for some reason a REST style call to a pag...