Questions tagged [jqxhr]

jqXHR is a jQuery object that provides a JavaScript cross-browser-compatible superset (wrapper) object for the browser-implemented XMLHttpRequest (XHR) object.

The jQuery XMLHttpRequest object (jqXHR in short) is returned by jQuery's $.ajax() method and as of jQuery 1.5, it is a superset of the browser's native XMLHttpRequest object. Among several properties and methods, it contains responseText, responseXML, and the getResponseHeader() method.

Example:

// send an AJAX request as usual
$.ajax('data.php'))    
  .done(function() {
    // the AJAX request was successful
    console.log('$.ajax succeeded');
  })      
  .fail(function() {
    // the AJAX request was unsuccessful
    console.log('$.ajax failed');
  })  
  .always(function() {
    // from jQuery 1.6, this function will always be called
    // either the AJAX request was successful or unsuccessful
    console.log('$.ajax either succeeded or failed');
  });

Resources

Related Tags

177 questions
0
votes
0 answers

Possible problems when async false for XMLHttpRequest?

Disclaimer: I am still learning and don't have a lot of experience. At the moment for ALL of my XMLHttpRequests I am using async = true. The problem is, when one requests takes longer and the user does not want to wait for the request and he clicks…
DDJS
  • 1
0
votes
1 answer

Web Scraping Underlying Data from Online Interactive Map

I am trying to get the underlying data from the interactive map on this website:https://www.sabrahealth.com/properties I tried using the Inspect feature on Google Chrome to find the XHR file that would hold the locations of all the points on the map…
yombob
  • 59
  • 6
0
votes
1 answer

TypeError: undefined is not an object (TS)

Im trying to set response array to an interface I have created (ApiPosts[]) And I'm getting this strange error when in trying to update the posts var to the response array. TypeError: undefined is not an object (evaluating 'this.posts =…
Bar Levi
  • 1
  • 1
  • 1
0
votes
0 answers

AJAX jqXHR.status = 0 when calling remote URL

I am trying to check username and password through restful web-service. So I am using AJAX to call the URL from JSP. Web service is running on another machine and the IP address of that machine is 100.100.100.100. When I run this programme It shows…
user9569492
0
votes
0 answers

HTTP404: NOT FOUND - The server has not found anything matching the requested URI

Trying to get a simple webpage running to get Github oauth access token. Code to get "code": window.location.replace("https://github.com/login/oauth/authorize?client_id=" + ClientID); Code to get "access_token": var data = { client_id:…
Vincent Li
  • 55
  • 1
  • 6
0
votes
1 answer

Laravel 5.4 Chunk Upload and Resumable upload for bigger file

I want to know if Laravel 5.4 or greater supports chunked file upload for large file size also resumable support in case of network issue. I have to upload big size videos but due to the network issue, this becomes heck to upload those. So is there…
Sumit Rai
  • 65
  • 5
  • 13
0
votes
0 answers

XHR request $.Ajax taking to long to respond after while

I know it maybe reported as duplicated, but I lost a lot of time (3 weeks) digging online everywhere trying to find a solution.. I'm working on php application for a sip - asterisk which allow me to get agents working on it.. and when I run my…
Hossam
  • 177
  • 1
  • 11
0
votes
1 answer

Loading file on JQuery dialog open

I have a JQuery dialog and inside that I am loading partial view $("#WOdialog").dialog({ width: 765, resizable: false, closeOnEscape: true, modal: true, …
Jalle
  • 1,566
  • 5
  • 22
  • 42
0
votes
1 answer

How to read a remote file with JQuery (and get a jqXHR readable error)

I'm trying to read a remote file ; I'm using the example on the jquery.get() documentation page : var jqxhr = $.get( 'http://stackoverflow.com/feeds/question/10943544', function() { alert( 'success' ); …
yPhil
  • 8,049
  • 4
  • 57
  • 83
0
votes
3 answers

Video still playing after removal from DOM, how to eliminate completely?

I have a container on my site where I dynamically inject new content via jQuery Ajax/XHR whenever a certain type of link is clicked. For some pages this container holds a grid with multiple HTML5
Tobias S.
  • 3
  • 4
0
votes
0 answers

jqXHR responseText equivalent in Angular 2 http

In a jQuery ajax request I can call .fail(function (jqXHR, textStatus, errorThrown) { return jqXHR.responseText; }); when the request fails. And it gives me the response the server has set. I would like to ask what is the exact equivalent of…
padr
  • 385
  • 1
  • 4
  • 16
0
votes
0 answers

How to retrieve request payload from browser

I am using protractor-cucumber framework and want to retrieve the request payload from the browser's network tab through script. Can anyone help?
0
votes
2 answers

How to use getjson() for multiple URLs

I am trying to retrieve some JSON files. It is not certain which URL will work, therefore I am looking for a way to try all URLs and if one fails, it try another. URLs like: www.domain.com/a.json www.domain.com/b.json www.domain.com/c.json var…
DannyBoy
  • 434
  • 5
  • 21
0
votes
1 answer

Understanding differences in Response headers

I need some insights understanding the following: I try to make calls to an external API where I don't have control on server. Vendors provide me with a static X-Auth-Token. Using a PHP script I'm able to retrieve JSON array as expected: $headers =…
Benoit
  • 374
  • 4
  • 20
0
votes
1 answer

Abort AJAX request on button click

I want to abort my AJAX file upload, using XML abort function. Below is script (jQuery), showing my AJAX request call: var jqXHR = new window.XMLHttpRequest(); $("#file_uploading").change(function(e) { var fullPath = $('#File-upload-0').val(); …
Priyank lohan
  • 483
  • 1
  • 6
  • 17