xmlhttprequest

Sending ajax form reloads page instead of sending request

I'm struggling to create a shoutbox for django. Everything works fine now concerning reading data from the database, but when I want to add a new shout the whole page is being reloaded, and from what I was able to check - form's action remains the same, and there is no request sent to function under specified url. What am I doing wrong h...

How do i return eval(code) and get an object back with javascript

I have this bit of code. What I want it to do is is load a .js file and then run it. when it runs i want it to return a parameter or even better an object. This is the code in my page var runCode = function(){ var xhr=new XMLHttpRequest(); xhr.open('GET','io.js',false); xhr.send(); return eval(xhr.responseText); }; An...

Is there a XHR request/response manager for Dojo

I was wondering if Dojo (or any of its extensions) provides a (reliable) XHR request/response manager that would allow me to queue, block and retry calls when needed. Something similar to AJAX Queue/Cache/Abort/Block Manager v. 3.0 for jQuery. ...

Need to send an XML request to a URL - where to start!

Hi guys, I need to send an XML request to a URL. Fairlu unsure where to start with this as it's not something I've attempted before. I'm doing this using PHP, and at the moment I'm calling the data from a mysql database where the last payment date is 90 days or over, showing it in a html table. Underneath this table I'd ideally like...

CD solution for my xmlHttpRequest

I've got a website that I've been asked to distribute on CD that uses xmlHttpRequest. As it'll be using file:// rather than http:// I think it's going to break. What is the best way to get this to work, if at all? Thanks ...

jsp with ajax two simultaneous requests only getting one response

I have a jsp page where I'm trying to send multiple (two currently) ajax requests at once, but I only seem to get the second response. This guy described my problem exactly, but his solution didn't work for me. Here is my js code: function createRequestObject(){ var req; if(window.XMLHttpRequest){ //For Firefox, Safa...

How to abort XMLHttpRequest if the connection timeout?

I'm experiencing an issue with XMLHttpRequest. If there is no Internet connection, my request is not timing out and thus freezing the browser. Here is the request code: var jsonData = new XMLHttpRequest(); jsonData.open('GET', urltest, false); jsonData.Timeout = 100; jsonData.send(null); if(jsonData.status == 200) { alert(json...

Why is my code failing to pass parameters from JavaScript to JSP using XMLHttpRequest?

I am trying to write JavaScript code which, on a mouse click event, sends some parameter (id) to the server-side JSP code. The JSP code then returns a string to the JavaScript. HTML code for the button: <button type="button" onClick="function();">Click Me!</button>" ...and the script: <SCRIPT LANGUAGE="JavaScript" TYPE="TEXT/JAVASC...

XMLHTTPrequest request not working

I tried the following code to send request to jsp page on a click of button. I checked on Httpfox but no request is going. I just used the whole of this code in the body of the html code. Am I doing some silly mistake. Kindly suggest.. <button type="button" onClick="handleButtonClick();">Click Me!</button> <script type="text/javascript"...

WebRequest giving 301 XML document not valid when Curl worked fine

I am trying to send an xml formatted document that I create to a phone and I keep getting a response back of 301 XML document not valid. I went on the W3C website and tested the string and it seems fine... here it so people see it. I was using php orgionally with cURL and here is what that looked like. XMLData = urlencode($X...

Http Post in Vba

I am trying to figure out how to make a POST in VBA. Ideally I'm looking for a simple working example that I can play with. This is what I have so far, but I'm not really sure what to do with it. Mostly what does the formdata look like. Function WinHTTPPostRequest(URL, formdata, Boundary) Dim http Set http = CreateObject("MSXML2.X...

AJAX call to REST web service

Hi, I have a REST web service located at http://localhost/doSomething accepting HTTP GET e.g. http://localhost/doSomething/1. It @Consumes nothing and @Produces application/xml or application/json. I'd like to be able to call this web service from a simple HTML form/JavaScript but I while I can get the web service to invoke I cannot ge...

prevent xmlHttpReq 's browser caching

It seems that all the browsers other than Opera cache XHR requests in my Javascript program. The URL in the XHR request refers to a CGI program on the server which generates a different output everytime its called. B Is there a way in Javascript to make the browser not cache XHR requests? ...

Getting XMLHttpRequest Progress from PHP Script

I am using javascript to run a XMLHttpRequest to a PHP script which returns data. Basically I want to be able to provide the user with a progress bar (instead of a spinning circle or something) that shows the progress of getting and receiving the data. I know if I was getting a file, I could just check the content length header and use t...

AJAX (XMLHTTPRequest) time delay

Hello. I am new to AJAX and have this issue. I am creating a photogallery page and on it I created a Javascript class which manager the whole thing. Here is a method from the class which calls XMLHTTPRequest object which was initialized successfully earlier: this.AJAX_update = function(id) { //initialize AJAX - this is done success...

Problem with onreadystatechange function, it 'freezes'.

Hi all, I have a bit of a strange problem. For one of my clients I've added some ajax functionality to their website. To get the context; it's a website for a travelagency and pricetables are generates by ajax-calls to reduce serverload and improve user experience. Only now I received an email where they say it is not working in IE7. ...

xmlHttp Request problem in IE7

Hi all, I have a bit of a strange problem. For one of my clients I've added some ajax functionality to their website. To get the context; it's a website for a travelagency and pricetables are generates by ajax-calls to reduce serverload and improve user experience. Only now I received an email where they say it is not working in IE7. ...

How many xml http requests is too much for a pc to handle?

I'm running mediawiki on an apache on a regular pc running vista (don't know the specific specs, but a regular pc, one year old, nothing special). Edit: I'm guessing something like duo core 2 2 giga hertz processor, broadband connection (500 kb/s at least) and most of the time the requests will be sent through LAN (but sometimes through...

Same origin policy -- JavaScript calling PHP

Hi, I know that this is a popular topic, but I've yet to find an answer that's completely comprehensive. I'm trying to create a simple way for our 'customers' to place a Google Map on their website, which plots the position of our customers (or a subset thereof) on the map. The customers are in a MySQL database which is turned into XML...

Javascript code working in the html file not working when taken as a string in C++

I have html file with javascript code the contents of the file are as under: I tried this code on Safari and it was working fine. But when I tried this on Firefox, it’s not working. Can any one suggest how to make it working on firefox. <html><head></head><body><button type="button" onClick="handleButtonClick();">undo</button> <button...