Jump to content

AJAX/XML/Javascript read problem


DickDeeds

Recommended Posts

Hi all,Below is the code and what is returned from the code. Even though I'm using the request.responseXML I get the message:[Object HTMLCollection]. It obtains the data correctly and inserts it into the XML code. Can you help??PHP function writing the code from databaseheader("Content-Type: text/xml");echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";echo "<inform>\n";echo "<From_Date>" . $rr['PP_From_Date'] . "</From_Date>\n";echo "<To_Date>" . $rr['PP_To_Date'] . "</To_Date>\n";echo "<Pledge_Amount>" . $rr['PP_Pledge_Amount'] . "</Pledge_Amount>\n";echo "<Contribution_Amount>" . $rr['PP_Contribution_Amount']. "</Contribution_Amount>\n";echo "</inform>";Javascript using the request object. alert(request.responseText); var xmlDoc = request.responseXML; var From_Date = xmlDoc.getElementsByTagName("From_Date"); document.frm_pledge_pledged.From_Date.value=From_Date; var To_Date = xmlDoc.getElementsByTagName("To_Date"); document.frm_pledge_pledged.To_Date.value=To_Date; alert("From="+From_Date+" To="+To_Date);From requequest.responseText From request.responseXML TIA,###### Deeds

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...