Bug Tracker

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: [email protected] Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


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);

Thanks for your time.

Change History (1)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledajax
Priority: undecidedlow
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.