javascript - Make AJAX GET query to a url and insert content returned to a div -
given url -
how can make ajax query (on page load) url above , insert content returned in empty div tag on html page?
<div id="ajax-result"></div>
i have tried .load method jquery not working
var url jquery(function($) { $('#ajax-result').load('url'); });
any ideas?
due same origin policy, can't make ajax calls domain different of code.
a possible solution proxy request through server side script on domain. you'd make ajax call own domain, invoke script request other domain via server server communication. third party give response server side script, in turn can pass response on through ajax response.
Comments
Post a Comment