[jQuery] getScript problem
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:
<span class="objectBox objectBox-errorMessage">[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 <a href="http://jquery.com">jquery.com</a> front page, which should be 1.1.2.
</span>
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 = "<a href="http://twitter.com/statuses/user_timeline/jackysee.json?callback=twitterCallback&count=1">http://twitter.com/statuses/user_timeline/jackysee.json?callback=twitterCallback&count=1
</a>";
$.getScript(url);
});
function twitterCallback(obj){
$("#text").html(obj[0].text);
}
</script>
</head>
<body><p id="text"></body>
</html><br clear="all">
--
Best Regards,
Jacky
網絡暴民 <a href="http://jacky.seezone.net">http://jacky.seezone.net</a>