newbie needs help with $.getJSON
hi all,
I've got a problem.
Normally I use Flash to send and receive json strings.
example:
send: http://www.client_url.com/reserv?{"method":"login","params" : {"username" : "test@mail.com","password" : "10015"} "id" : "45"}
receive: {"result" :{"json_code" :"0","client_id" :""},"error" : "1","id" : "45"} (wrong username or password)
or receive: {"result" :{"json_code" :"0","client_id" :"0078"},"error" : "0","id" : "45"} (everything ok)
How to this with jQuery?
I've tried
function callback(result){
alert(result);
}
$.getJSON('http://www.client_url.com/reserv?{"method":"login","params" : {"username" : "test@mail.com","password" : "10015"} "id" : "45"}' , callback);
doesn't work! alerts "null".
How is it done?
regards