@Description: Calls for cross site json data to load into a local callback function via script tag
@File: json/xsite.js
@Version: 1.0 07-27-09 07-29-09
@Param: Object params An objectw ith all the properties of the swf should have once embedded
url - the url of the json data
callback - The callback function to pass the json data to
data - Additional post data to pass to the url, is GET data and must adhere to GET data length restrictions
@Return: Object A sb.json.xsite instance with the properties specifed in the param argument and by sb.json.xsite.prototype
@Example:var xsite = new sb.json.xsite({
url : 'http://somesite.com/get_user/78',
data : {
'dog' : 'big'
},
callback : function(json){
alert(json.uname);
}
});
xsite.fetch();
//to test with test data
xsite.fetch({uname: 'paul'});