|
|||||||
| JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...) |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
jQuery: cross-domain json error
Hi,
I've been pulling my hair out with this one. Code:
$.getJSON(
url,
{data:data},
receive
);
- "invalid label" - "Access to restricted URI denied code:1012" Also in what I've read, there was mention that jQuery for cross-domain JSON parsing is not secure. It shouldn't need more than a few lines of code? Either way I'm at a bit of a loss. Thanks |
|
#2
|
||||
|
||||
|
You have to include a JSONP parameter which the external site will include in the page.
JSONP creates a function and wraps it around the JSON object. Docs explain it: http://docs.jquery.com/Ajax/jQuery.getJSON Eric
__________________
Tech Author [Ajax In Action, javascript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|