hey guys would be great if anyone can explain json stuff to me basically my callback right now is
callback: function(ui,type,value){
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: "/rating",
data: "selrate=" + value + "&url=" + window.location,
success: function(json){
alert(json.foo);
}
});
}
now in my php it works if i just do
echo $_GET['jsoncallback'] . '({"foo":"blah"})';
exit();
but what i really wanna do is execute code and then echo the variable out. is that possible? because when i try i get no response.