Jquery Ajax Returned Array - how to handle in Javascript

Posted by user232840 on Stack Overflow See other posts from Stack Overflow or by user232840
Published on 2009-12-28T09:17:31Z Indexed on 2010/03/13 16:05 UTC
Read the original article Hit count: 262

Filed under:
|
|
|
|

Hi there,

If someone could assist me please. I'm doing a jquery Ajax post, for some reason the Json object isn't working so just returning a php array instead

$.post
(  
  "classes/RegisterUser.php",  
  $("#frmRegistration").serialize(),  
  function(data)
  {  
   alert(data);  
  } 
);

The data is returned to Javascript 100% as

array
(
   [key]=>value
   [Name] => SomeOneName
   [Surname] => SomeOneSurName
)

How would i go about getting the value of Surname in Javascript?

Thanks for your assistance? Regards

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about post