Jump to content

Parsing XML String as AJAX ResponseText


in2_php

Recommended Posts

Hi Everyone,

 

I am a newbie to the world of AJAX and PHP.

 

Recenlty  i came to face with a problem when trying out AJAX and PHP,

 

The Task is :

 

The page contains a drop down list and a submit button. when the user selects a particular user in the drop down list. we have to display a list of related values regarding the user from multiple tables in the the requesting page using AJAX and XML. ie we need to pass the values from the database to calling page in XML format and we need to parse the "ResponseText" to show the result in the calling page.

 

Can anyone help me on this topic. ???

 

Thanks in advance.

 

Regards

 

Bob

Link to comment
https://forums.phpfreaks.com/topic/47258-parsing-xml-string-as-ajax-responsetext/
Share on other sites

Hi Bob

i dont know about your ajax experience .

do you use core xmlhttprequest or cpaint or prototype.js or any other else ?

 

well in ajax there are different response type of ajax (XMLHTTPRequest). it may be a responseText or responseXML .

 

now if you do return xml from the php , you have to use responseXML from the js

 

moreover you can use JSON (http://json.org) as its easy to handle both in php and js side

 

Thanks

Shaymol

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.