the basics: php, jquery, javascript
server side ajax_member.php (bascially try to send what I get back to the
client,.. for testing!!!)
<?php
$arr = $_GET;
$myjson = json_encode($arr);
echo $myjson;
?>

client side:

var data =
{
"mybutt" : "is so big!",
"member" :
{
"name" : "Donald Duck"
}
}

$.ajax({
url: "http://localhost/test/gui/ajax_member.php";,
type: "GET",
data: data,
cache: false,
dataType: "json",
 success: function(json){
alert( json.member.name );
}
});

my problem is that the json.member.name is undefined??? why? how do I access
it or what am I doing wrong?
if I use json.mybutt I get what I expect.. why does the json.member.name not
work?

anyone... (been working 8 hours on this problem!)

regards,
Peter


-- 
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com

Reply via email to