xmlhttprequest

Internet Explorer 11 - AJAX Call not firing

北城余情 提交于 2019-12-24 18:12:09
问题 I am stuck in the middle of a bug. I began to use BrowserStack to validate my current project against Windows IE and EDGE and I got a particular issue with IE 11. I first got an issue that I solved which was that FormData did not have any .get() methods, and I used the NPM formdata-polyfill for that. I am working on a native JS login form, using FormData and XMLHTTPRequest, and it seems that the AJAX call is not firing at all. When clicking on the submit button, instead of sending to my

How to reject promise on d3 xhr request timeout?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 17:42:26
问题 I want to set a timeout value so that if the server does not respond in that particular time frame then UI should move ahead and not wait for response. I have used the below syntax so far but the UI gets hanged waiting for response. How can I specify a callback to reset the values and inform UI that no longer needed to wait. q.promise(function(resolve, reject) { d3.xhr(my_url) .header('Content-Type', 'text/xml') .timeout(2000) .send(this.my_method, my_xmlData, function(error, data) { }) }); I

Form post asp classic xmlhttp

北城余情 提交于 2019-12-24 17:21:04
问题 I'm trying to do a form post from another site that is not mine, but I am not able ta give error. There on the site the post is mounted like this: <a href="javascript:document.result.submit()" class="lnk-more">Veja o resultado da enquete anterior »</a> <br /><br /> <form name="result" action="http://enquete.terra.com.br/enquete.cgi" method="post"> <input type="hidden" name="id_enquete" value="144143"> <input type="hidden" name="opcao" value="0"> </form> And I'm riding in the asp script to

how to receive XML in IE8 with mootools

て烟熏妆下的殇ゞ 提交于 2019-12-24 16:29:41
问题 I'm doing a web where I heavily use AJAX requests to a XML service. In fact, my web is a front-end with almost no server whatsoever and uses AJAX to communicate with the back-end. Everything was going fine (I developed and tested in Ubuntu 9.04 and Firefox 3.0 as a browser). One day I decided to see how my web did in IE8... horror! Nothing was working as it marvelously did in Firefox. To be more specific, the Request.HTML's were not working. As I said, my web relied heavily on that, so

XMLHttprequest not working the twitch.tv api

冷暖自知 提交于 2019-12-24 15:49:45
问题 So I've been trying to access the twitch.tv api but every time i go to make a request i keep on getting the error: "XMLHttpRequest cannot load https://api.twitch.tv/kraken/streams/normalice. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8080' is therefore not allowed access." I'm currently using the live-server package during the development process other wise I'm just using html, css, javascript. Here is my javascript: var req = new

Post file to Server asp.net using XMLHttp

耗尽温柔 提交于 2019-12-24 14:17:43
问题 I use an Macro enabled word file. I need to save the document on the server given an URL and an aspx page to post to using VBA code here is what i have done . 'sends multipart/form-data To the URL using WinHttprequest/XMLHTTP 'FormData - binary (VT_UI1 | VT_ARRAY) multipart form data Function WinHTTPPostRequest(URL, FormData, Boundary) 'Dim http As New MSXML2.XMLHTTP 'Create XMLHTTP/ServerXMLHTTP/WinHttprequest object 'You can use any of these three objects. 'Set http = CreateObject("WinHttp

Catching 403 from $.ajax promise in jQuery v1.x

夙愿已清 提交于 2019-12-24 14:12:43
问题 I'm having problems with catching 403 from $.ajax promise in jQuery v1.x. The same code $.ajax({ dataType: 'jsonp', url: 'http://www.checkupdown.com/accounts/grpb/B1394343/', type: 'GET' }).then(function () { console.log('success', arguments) }, function () { console.log('error', arguments) }); rejects the promise as expected in jQuery v2.x but logs nothing in jQuery v1.x (the promise has readyState == 1 ). The examples use 2.1.3 and 1.11.3 jQuery versions respectively. Why exactly does this

IE11 XMLRequest Access is Denied

雨燕双飞 提交于 2019-12-24 12:44:17
问题 I tried to do a simple AJAX request on http://localhost:8080/ and I get an error right away when using IE 11. I don't think IE is even trying to send anything. Did somebody meet this issue? Here is a fiddle showing this behavior, html: <button id='btn1'>launch</button> onLoad: var xhr,btn=document.getElementById('btn1'); btn.onclick=onButton; var onReadyState=function(){ console.log('ready state:'+_xhr.readyState); if(xhr.readyState===4){ console.log('status:'+_xhr.status); } } function

Jquery Caching Ajax XMLHttpResponse using Local Storage

不羁的心 提交于 2019-12-24 12:42:44
问题 I have a Jquery web site that needed to be upgraded to provide Local Storage caching capability, Target was making every Ajax request checks first if there is a cached response HTML, then it will NOT call the server side, but gets data from cache instead. Everything going OK with caching and displaying data from cache and so on.. My problem appeared when applying my caching core to sites that heavily depending on XML HTTP Response Headers; It Appeared that when I try to cache the

XMLHttpRequest send only 130 kB max size file

别来无恙 提交于 2019-12-24 12:13:02
问题 I send file using XMLHttpRequest and it works "OK" while size of file less 130 kB. My code is var xhr = new XMLHttpRequest(); xhr.upload.onprogress = function(e){ if (e.lengthComputable){ self._loaded[id] = e.loaded; self._options.onProgress(id, name, e.loaded, e.total); } }; xhr.onreadystatechange = function(){ if (xhr.readyState == 4){ self._onComplete(id, xhr); } }; // build query string params = params || {}; params['qqfile'] = name; var queryString = qq.obj2url(params, this._options