jQuery's getScript implementation uses ajax and therefore you can not make cross-domain requests. But Michael Geary has a nice JSON plugin:
http://mg.to/2006/01/25/json-for-jquery Mike On 6/17/07, Jacky <[EMAIL PROTECTED]> wrote:
I have tried to test on the twitter json and so I use the getScript to do that. It works in IE but not Firefox. The js console error shows: [Exception... "' P ³å|ë method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no] I'm using the latest packed version on jquery.com front page, which should be 1.1.2. Code: <html> <head> <title>Test jQuery Twitter</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ var url = "http://twitter.com/statuses/user_timeline/jackysee.json?callback=twitterCallback&count=1 "; $.getScript(url); }); function twitterCallback(obj){ $("#text").html(obj[0].text); } </script> </head> <body><p id="text"></p></body> </html> -- Best Regards, Jacky 網絡暴民 http://jacky.seezone.net