Search Results

Search found 535 results on 22 pages for 'xmlhttprequest'.

Page 2/22 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • msxml XMLHTTPRequest and timeout

    - by Tamm
    Hi, what determins the timeout value for XMLHTTPRequest (msxml version) send method? I'm calling it from MS Sql server and the server profiler shows me 'completed' after 30 seconds, the same happens when calling it through client programm calling stored proc. I set the client connection timeout to 120 sec. So im thinking it must be msxml that cancels send method after 30 secs. Any ideas?

    Read the article

  • xmlhttprequest always return with status code 0 for firefox

    - by Neo
    hi, I am trying to make asynchronous calls using xmlhttprequest object so it completely works fine in internet explorer but for firefox it wont work a small code snippet of problem if (req.readyState == 4) { if (req.status == 200) //here firefox gives status code always 0 and for IE works fine { //read response } else { alert("There was a problem with the request."); } }

    Read the article

  • How to receive XMLHttpRequest with PHP?

    - by Adrian
    I would like to be able to read XMLHttpRequest that is sent to a PHP page. I am using prototype's Ajax.Request function, and I am sending a simple XML structure. When trying to print the POST array on the PHP page, I don't get any output. Any help appreciated.

    Read the article

  • Cannot get xmlhttprequest.responseText from JQuery

    - by Felix Guerrero
    Hi. I got this function function verify_at_bd(){ var u = "foo"; var p = "bar"; return $.post('auth.php', { name: u, password: p, mobile: '' }, function(result){ return result; },'json'); } If I do a console.log(verify_at_bd()) I'm getting an xmlhttprequest but cannot access to responseText property. I'm using header("Content-Type: application/json") into my PHP. I'm using firefox 3.6 on OS X.

    Read the article

  • AJAX XMLHttpRequest Error Flag

    - by blackberryfan234
    Hi, I made a query to an address and I got the readyState = 4, and the status = 0. After I read the documentation for the XMLHttpRequest, it says if the status = 0 and readyState = 4, then check the associated error flag. How can I see whats in this error flag to determine the cause of the status not being set to 200? Thanks.

    Read the article

  • Using XMLHttpRequest ??

    - by Rohan
    Hey I'd like to know how to use XMLHttpRequest to load the content of a remote URL and have the HTML of the accessed site stored in a JS variable. Say, if I wanted to load and alert() the HTML of http://foo.com/bar.php, how would I do that? Thanks!

    Read the article

  • XMLHttpRequest and certificate errors.

    - by Dan G
    I'm using a XMLHTTPRequest object in my C++ project. I have things working fine with normal http requests and https requests on servers with valid certificates. When I attempt to make an https:// request to a server who's certificate would produce an IE "There is a problem with this website's security certificate." error if I tried to browse there with IE, the request fails. The result I get back from the request is a 12019 error. Is there any way to make the request ignore the error and continue on as if a user had clicked on the "continue to this website" link. You are going to suggest I fix whatever is wrong with the certificate. At the moment I don't have control of that certificate, so I'm looking for an answer (if there is one) that does not include correcting the certificate. Thanks.

    Read the article

  • Find the xmlHttpRequest resource in aspx page

    - by DJStroky
    I'm trying to find an xmlHttpRequest or similar resource that I can query directly to obtain an xml file for my own purposes. At this site it is possible to browse a Google Map mashup with markers. Unfortunately it is only possible to view all markers at a small view range, whereas I simply want to obtain all the information at once for the entire state. Using the firebug console in firefox I can enter the following javascript line to obtain the xml that I desire: document.getElementById("stationXML").value I tracked this document element down to an <input> tag, but I can't figure out how that input is set. Thanks in advance for your help!

    Read the article

  • XMLHttpRequest - JSON - .NET

    - by user318194
    I am trying to send JSON from my mozilla addon to my asp.net page. var myJSONObject = {"userName": una,"password": pass}; request = new XMLHttpRequest(); request.open("GET",http://www.google.com/jo=" + myJSONObject,true, null, null); on my .net page I have tried several ways of doing it but not able to find the best way to serialize and deserialize the code. All I need is to send the json data back n forth and parse it on C# n javascript. I am new to all this so any guidance and/or change in direction is appreciated.

    Read the article

  • Why should I reuse XmlHttpRequest objects?

    - by Xavi
    From what I understand, it's a best practice to reuse XmlHttpRequest objects whenever possible. Unfortunately, I'm having a hard time understanding why. It seems like trying to reuse XHR objects can increase code complexity, introduce possible browser incompatibilities, and lead to other subtle bugs. After researching this question for a while, I did come up with a list of possible explanations: Fewer objects created means less garbage collecting Reusing XHR objects reduces the chance of memory leaks The overhead of creating a new XHR object is high The browser is able to perform some sort of network optimization under hood But I'm not sure if any of these reasons are actually valid. Any light you can shed on this question would be much appreciated.

    Read the article

  • Navigate with location.href during XMLHttpRequest asynchronous call

    - by OlduwanSteve
    I have a web page containing something like this: <div onclick="location.href = 'AnotherPage';"> This page also uses asynchronous XMLHttpRequests for some ajax updating. I have found that while an asynchronous XMLHttpRequest is in progress, clicking on this div does not load the new page. If I cancel my request first then it works fine. This seems wrong, but I cannot find any documentation that describes what should happen. So the question is: what should happen to asynchronous XMLHttpRequests in progress when a new page is loaded using location.href?

    Read the article

  • Using two xmlhttprequest calls on a page

    - by blacktooth
    I have two divisions, <div id=statuslist></div><div id=customerlist></div> The function sendReq() creates a xmlhttprequest and fetches the data into the division. sendReq('statuslist','./include/util.php?do=getstatuslist','NULL'); sendReq('customerlist','emphome.php?do=getcustomerlist','NULL'); I have a problem, The data fetched into the 'customerlist' gets copied onto 'statuslist' If i change the order of function calls, sendReq('customerlist','emphome.php?do=getcustomerlist','NULL'); sendReq('statuslist','./include/util.php?do=getstatuslist','NULL'); Now the data of 'statuslist' gets into 'customerlist'.. Whats the problem with the code?

    Read the article

  • XMLHttpRequest second call always fail

    - by Michael
    I'm developing Firefox extension and inside of javascript module have function which looks like this: var ajax = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); ajax.open('GET', url, true); ajax.onload = function () { if (ajax.readyState == 4 && ajax.status == 200) { ... } } ajax.onerror = function (e) { ... } The second call to this function always fires onerror immediately... then after that the next call is successful. What could be wrong... is it normal?

    Read the article

  • XMLHttpRequest.status always returning 0

    - by Michael
    html <a href="#" onclick="MyObj.startup()">click me</a> js code var MyObj = { startup : function() { var ajax = null; ajax = new XMLHttpRequest(); ajax.open('GET', 'http://www.nasa.gov', true); ajax.onreadystatechange = function(evt) { if(ajax.readyState == 4) { if (ajax.status == 200) { window.dump(":)\n"); } else { window.dump(":(\n"); } } } ajax.send(null); } } ajax.status always returning 0, no matter which site it is, no matter what is the actual return code. I say actual, because ajax.statusText returning correct value, eg OK or Redirecting... ajax.readyState also returns proper values and 4 at the end.

    Read the article

  • XMLHttpRequest open() returning access denied

    - by rjovic
    Hi! I have problem with xhr open() method. My code follows : var xmlhttp=false; if(!xmlhttp) try { xmlhttp=new XMLHttpRequest(); } catch(e) { xmlhttp=false; } function returnPage(url) { if(!xmlhttp) return alert("Your browser doesn't seem to support XMLHttpRequests."); xmlhttp.open("GET",url,true); xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState!=4) return; if(!xmlhttp.status||xmlhttp.status==200) alert(xmlhttp.responseText); else alert("Request failed!"); }; //onreadystatechange xmlhttp.send(null); } Call : <a href='#' onclick="returnPage('http://www.something.com'); return false;">Link 1</a></p> I'm using IE8 (because I'm building web slice) and I received error "Access denied". I found on the Internet that problem is that XHR isn't working across different domains, but I used code from Firefox Add-on which is working OK. And that add-on and "my" code (which are the same) are calling the same page. How that add-on have access and my code not?

    Read the article

  • XMLHttpRequest leak

    - by Raja
    Hi everyone, Below is my javascript code snippet. Its not running as expected, please help me with this. <script type="text/javascript"> function getCurrentLocation() { console.log("inside location"); navigator.geolocation.getCurrentPosition(function(position) { insert_coord(new google.maps.LatLng(position.coords.latitude,position.coords.longitude)); }); } function insert_coord(loc) { var request = new XMLHttpRequest(); request.open("POST","start.php",true); request.onreadystatechange = function() { callback(request); }; request.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); request.send("lat=" + encodeURIComponent(loc.lat()) + "&lng=" + encodeURIComponent(loc.lng())); return request; } function callback(req) { console.log("inside callback"); if(req.readyState == 4) if(req.status == 200) { document.getElementById("scratch").innerHTML = "callback success"; //window.setTimeout("getCurrentLocation()",5000); setTimeout(getCurrentLocation,5000); } } getCurrentLocation(); //called on body load </script> What i'm trying to achieve is to send my current location to the php page every 5 seconds or so. i can see few of the coordinates in my database but after sometime it gets weird. Firebug show very weird logs like simultaneous POST's at irregular intervals. Here's the firebug screenshot: IS there a leak in the program. please help. EDIT: The expected outcome in the firebug console should be like this :- inside location POST .... inside callback /* 5 secs later */ inside location POST ... inside callback /* keep repeating */

    Read the article

  • Javascript XMLHttpRequest Post method

    - by user535617
    Hey So I have a question about posting using an XMLHttpRequest. In theory, if I am to post a username and password to an https domain (which I have yet to get working, unfortunately) would the responseText then change to the next website, or should the text fields become filled in? What normally happens is you navigate to this page via browser, enter a username and password, and it uses a POST method when the submit button is clicked, doing some authentication under the hood and returning a different page. I feel like maybe the responseText should even stay exactly the same (which is what happens now), but I don't know as I have no experience with this kind of thing. this.requests[1].open("POST", "https://" + this.address, true); var query = "target=%2Fcgi-bin%2FStatusConfig.cgi%3FPage%3Dindex&userfile=&username=user&password=pass&log+in=Log+in"; this.requests[1].setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); this.requests[1].setRequestHeader("Content-length", query.length); this.requests[1].setRequestHeader("Keep-Alive", 115); this.requests[1].setRequestHeader("Connection", "keep-alive"); this.requests[1].setRequestHeader("Host", this.address); this.requests[1].send(query); this.requests[1].onreadystatechange = onReadyStateChange1; Then basically onReadyStateChange1 displays the responseText when ready. Any light that could be shed on what SHOULD be happening with the post and responseText would be very appreciated. As would any advice in getting the new, logged into page. For further clarification, what I'm trying to do is log in and then return the new page, because the login page displays only log in information/functionality and the page after logging in has a lot of relevant information. I'm not trying to check the credentials as much as I'm trying to get it (the script) to log in so it can access the next page. Granted, the credentials will have to be valid for that. Thanks all.

    Read the article

  • Problem with making a simple JS XmlHttpRequest call

    - by recipriversexclusion
    I have to create a very simple client that makes GET and POST calls to our server and parses the returned XML. I am writing this in JavaScript, problem is I don't know how to program in JS (started to look into this just this morning)! As n initial test, I am trying to ping to the Twitter API, here's the function that gets called when user enters the URL http://api.twitter.com/1/users/lookup.xml and hits the submit button: function doRequest() { var req_url, req_type, body; req_url = document.getElementById('server_url').value; req_type = document.getElementById('request_type').value; alert("Connecting to url: " + req_url + " with HTTP method: " + req_type); req = new XMLHttpRequest(); req.open(req_type, req_url, false, "username", "passwd");// synchronous conn req.onreadystatechange=function() { if (req.readyState == 4) { alert(req.status); } } req.send(null); } When I run this on FF, I get a Access to restricted URI denied" code: "1012 error on Firebug. Stuff I googled suggested that this was a FF-specific problem so I switched to Chrome. Over there, the second alert comes up, but displays 0 as HTTP status code, which I found weird. Can anyone spot what the problem is? People say this stuff is easier to use with JQuery but learning that on top of JS syntax is a bit too much now.

    Read the article

  • IE8 XmlHttpRequest Debugging

    - by Raegx
    I am looking for some way to elegantly inspect XmlHttpRequests in IE8. I wouldn't mind a plugin or an external program. I have yet to find anything that works nearly as well as Firebug. I have already tried Julien Couvreur's bookmark debugger, but it did not seem to work with Prototype. Julien's Script

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >