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
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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.