Reputation: 1
I'm loading pages asynchronously with jQuery's load function. It loads all external content perfectly fine except when I try to embed a link from pastie.org, like this:
<script src='http://pastie.org/3644003.js'></script>
When I hardcode this into the main site it works, however, as soon as I load it via .load() it stays blank.
I'm guessing this is some kind of limitation of Ajax. Any ideas how to fix that?
Upvotes: 0
Views: 83
Reputation: 17808
From the documentation of .load at http://api.jquery.com/load/
Due to browser security restrictions, most "Ajax" requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, or protocol.
Upvotes: 2
Reputation: 2078
Instead of using the load function try using the
$.getScript('http://pastie.org/3644003.js')
function
Upvotes: 0