Re: how i could place data in a textbox
Thursday, May 3, 2007 08:19 AM
Instead of http.responseText you can get the xml as http.responseXML to which you can parse using the DOM API and get the specific value in that xml you need to display in the text box.
suppose your xml is has some tag called "description" then you can write the below code .
var xml = http.responseXML;
var descriptions = xml.getElementsByTagName("description");
in the above statement descriptions is an array of the description tags so if you have only one you can directly use the 0 index to get that value like below.
document.getElementById('name').value = descriptions.firstChild.nodeValue;
to know more details you can look into the http://www.w3schools.com/dom/default.asp
Krishna Rajendra A.