Opened 12 years ago
Closed 12 years ago
#9503 closed bug (invalid)
jQuery .load() doesn't work when requesting urls out of the current domain
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | ajax | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Any time I try to use jQuery .load() function to retrieve content out of the domain I'm running my script from, returned status equals to "error" and error code for xhr is 0. If I change the request url to one in my domain it queries the info as expected.
Example code:
<div id="page">Loading...</div> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> <script type='text/javascript'> $(document).ready(function() { $("#page").load('http://developtolearn.blogspot.com/', function(response, status, xhr) { if (status == "error") $("#page").html('Sorry but there was an error browsing for FirebirdOS: '+xhr.status+' '+xhr.statusText); }); }); </script>
Thanks for your time.
Change History (1)
comment:1 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Same Origin Policy http://www.w3.org/TR/XMLHttpRequest/#the-open-method