> > From: Neil.Young > > > OK. Thanks Mike, this was a very interesting lesson. But what > about the "not cross-domain" claim?
Glad to help. Let's break it down a bit more. The cross-domain question is really completely separate from the data format. The bottom line is: XMLHttpRequest can *not* be used cross-domain. Script tags and dynamic script elements *can* be used cross-domain. You can put any piece of executable JavaScript code in a file, and load and execute it cross-domain. A JSON object by itself is not executable JavaScript. It is a valid JavaScript object, but you need something more to make it directly executable: perhaps a variable assignment as you used, or a function call. JSONP is merely a popular convention for turning a JSON object into executable JavaScript code, by wrapping it in a function call. -Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
