/ Published in: JavaScript
URL: http://bcmoney-mobiletv.com/blog/2009/05/01/the-server-side-proxy/
Several useful resources for JSONp: http://www.west-wind.com/weblog/posts/107136.aspx
http://insideria.com/2009/03/what-in-the-heck-is-jsonp-and.html
http://remysharp.com/2007/10/08/what-is-jsonp/
http://www.ibm.com/developerworks/library/wa-aj-jsonp1/
http://jpgmr.wordpress.com/2010/07/28/tutorial-implementing-a-servlet-filter-for-jsonp-callback-with-springs-delegatingfilterproxy/
http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/
Expand |
Embed | Plain Text
function jsonp(url,callback,name, query) { if (url.indexOf("?") > -1) url += "&jsonp=" else url += "?jsonp=" url += name + "&"; if (query) url += encodeURIComponent(query) + "&"; url += new Date().getTime().toString(); // prevent caching var script = document.createElement("script"); script.setAttribute("src",url); script.setAttribute("type","text/javascript"); document.body.appendChild(script); }
You need to login to post a comment.
