Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Populating selects from rest service

I found this, it seems that data is now missing:

jQuery.post( url [, data] [, success(data, textStatus, jqXHR)] [, dataType] )

urlA string containing the URL to which the request is sent.

dataA map or string that is sent to the server with the request.

success(data, textStatus, jqXHR)A callback function that is executed if the request succeeds.

dataTypeThe type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Populating selects from rest service

jqXHR.ings is undefined

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Populating selects from rest service

I had to use the success event, then data is there. All good now.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Populating selects from rest service

Just to add, you can always do console.log(jqXHR) to see what you get back.

http://api.jquery.com/jQuery.ajax/

Return to “Issues”