Tony
Tony

Reputation: 12695

jQuery Load function doesn't load the URL result?

I have the generated link to the ISSUU's PDF:

http://issuu.com/press/docs/2008-12?mode=window&printButtonEnabled=false&shareButtonEnabled=false&searchButtonEnabled=false&backgroundColor=%23222222

then, I want to load that URL content into a DIV:

$("#inner").load('http://issuu.com/press/docs/2008-12?mode=window&printButtonEnabled=false&shareButtonEnabled=false&searchButtonEnabled=false&backgroundColor=%23222222');

the server returns 200 status (OK) but, the FireBug marks that request red:

enter image description here

and nothing shows inside that DIV. Why ?

Edit

It also fails if I change the request to Post:

$.post('http://issuu.com/press/docs/2008-12?mode=window&printButtonEnabled=false&shareButtonEnabled=false&searchButtonEnabled=false&backgroundColor=%23222222',{},
                function(res){ $("#inner").html(res);});

Upvotes: 1

Views: 140

Answers (2)

Fabian
Fabian

Reputation: 179

To circumvent the same origin policy you could you use a proxy script on the same domain to fetch the remote page.

Upvotes: 1

Brendan
Brendan

Reputation: 3493

Browsers won't allow cross-domain AJAX calls.

You could use an iframe?

Upvotes: 3

Related Questions