Syntax help

Syntax help

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.

  1. var ceix = $("#scceix").val();                            
  2. var dsts = $("#scdsts").val();                            
  3.     $.ajax({                                              
  4.     type: 'get',                                          
  5.     async: false,                                         
  6.     dataType: 'json',                                     
  7.     url:'AJAX09R.PGM',                                    
  8.     data:{USER: "/%USER%/", SCEICX: ceix, SCDSTS: dsts},  
  9.     success: function($json){                             
  10.          alert("Success: " + JSON.stringify($json));      
  11.     $.ajax({                                                           
  12.     type: 'get',                                                       
  13.     async: false,                                                      
  14.     dataType: 'jsonp',                                                 
  15.     url:'http://open.mapquestapi.com/geocoding/v1/address?inFormat=json&outFormat=json&callback=?',
  16.     data:{location:$json},                                             
  17.     success: function(response) {       
  18.         // ***Getting error here ***//                       
  19.           editResults(response);   //function outside of ajax                                 
  20.           }                                                         
  21.     });   // ajax                                                       
  22.       }  // success                                                    
  23.     });   // ajax