I'm very new to the json stuff (so warned)...
when I try the following:
var data =
{
"member" :
{
"name" : "Peter Wraae Marino"
}
}
$.ajax({
type: "GET",
data: data,
cache: false,
dataType: "json",
success: function(msg){
alert( msg );
},
error: function( XMLHttpRequest, textStatus, errorThrown ){
var t = "XMLHttpRequest: "+XMLHttpRequest+"\n";
t+= "textStatus: "+textStatus+"\n";
t+= "errorThrown: "+errorThrown+"\n";
alert( t );
}
});
I get an error message saying parsing error, I assume this means my data format is wrong.
but when I see how other people have used json data format then I think the way I did it is right?
can someone help me out here?
regards,
Peter
--
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com
No comments:
Post a Comment