javascript - jsonp and callback function name -
after reading jsonp explained still have questions.
1) happens if don't supply callback function name, supply ?callback=?
?
2) happens if supply callback function name, don't have function same name declared in code ?
thanks
jquery replace ? char callback function name. name must function name in response make jsonp request working.
$.getjson('url/?callback=?').success(function(response){ // process response data; });
wil call e.g.
http://url/?callback=jquery325412324_2343224
then server need send callback like
jquery325412324_2343224(['json_data'])
Comments
Post a Comment