Page 2 of 2

Populating selects from rest service

Posted: Thu Oct 18, 2012 1:14 pm
by Barbara

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).


Populating selects from rest service

Posted: Thu Oct 18, 2012 1:18 pm
by Barbara

jqXHR.ings is undefined


Populating selects from rest service

Posted: Thu Oct 18, 2012 1:27 pm
by Barbara

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


Populating selects from rest service

Posted: Thu Oct 18, 2012 3:27 pm
by maxkatz

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

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