0

I have two domains hosting individual websites, A and B. Website B has an allowance that lets website A access it cross-domain. I'm trying to run a script on Website A to pull some information from a table on website B.

If I call get() with Website B's URL from Website A, it returns successfully and contains the entire page called. But if I call load() with that same Website B URL from Website A, Firebug shows me a Successful GET followed by two canceled GET calls to the domain.

Does Load() function differently than Get(), and simply not allow a cross-domain load at all? Is there a way around it?

Edit: Here's the GET call for the entire page with a data printout:

$.get("http://WebsiteB", function(data) {
        console.log("Data Loaded: " + data);
    });

and here's the LOAD call with the same URL used, pulling a specific table.grid:

$('.page:last').load("http://WebsiteB table.grid:eq(4)");

On the same domain both of these calls function perfectly. Using the secondary domain, with access allowed from Website A , the GET call works but the LOAD call fails.

Fields
  • 687
  • 1
  • 6
  • 13
  • 3
    Could you please post your code? – Bergi Jul 17 '13 at 14:37
  • Sure, but i'm kind of generalizing. I added in my GET and LOAD calls. Hopefully I'm not just using load incorrectly. I've been able to successfully `load` and `get` from the same domain using these calls, but just the load call fails when the secondary domain is the target. – Fields Jul 17 '13 at 14:55
  • 1
    Seems like we would need some more details. Certainly not a duplicate, I think. – kapa Jul 17 '13 at 14:59
  • The other question doesn't touch upon multiple domains at all. It's someone asking for the proper circumstances to use either call, which I'm not asking for. Unfortunately people seem to be marking it as duplicate. What other information can I provide to help, baz? – Fields Jul 17 '13 at 15:02

0 Answers0