Hello,
Im ...attempting... a second ajax call within the success function of the first. The first on is type:json. The second is type:jsonp.
The chrome debugger is throwing "syntax error "("". But i cant find it. Everything looks good to me.
I wish I could find a good eclipse plugin or editor, I spend a lot of time trying to figure this stuff out.
- var ceix = $("#scceix").val();
- var dsts = $("#scdsts").val();
- $.ajax({
- type: 'get',
- async: false,
- dataType: 'json',
- url:'AJAX09R.PGM',
- data:{USER: "/%USER%/", SCEICX: ceix, SCDSTS: dsts},
- success: function($json){
- alert("Success: " + JSON.stringify($json));
- $.ajax({
- type: 'get',
- async: false,
- dataType: 'jsonp',
- url:'http://open.mapquestapi.com/geocoding/v1/address?inFormat=json&outFormat=json&callback=?',
- data:{location:$json},
- success: function(response) {
- // ***Getting error here ***//
- editResults(response); //function outside of ajax
- }
- }); // ajax
- } // success
- }); // ajax