actually i missed to print it here its there in my code, my problem is i have a
servlet generating xml file
<?xml version="1.0" encoding="ISO-8859-1" ?>
<parent>
<areacode>00/000/00</areacode>
<areacode>40/111/00</areacode>
<areacode>30/99/20</areacode>
<areacode>10/090/50</areacode>
<areacode>50/060/00</areacode>
<areacode>80/600/05</areacode>
</parent>
using ajax xmlHttp object i am reading this xml file
i have a text input field whenever i enter a number it makes ajaxcalls
if i enter 00 in text input field it should display the areacodes that have zeros in it in the div tag.
i.e
00/000/00
40/111/00
50/060/00
but here it is not displaying all the three values it just displaying only one value that is 50/060/00.
My .js file contains the code:-
for(i=0;i<alength.length;i++)
{
var message= new array(alength.length);
message[i]=xmlHttp.responseXML.getElementsByTagName("areacode")[i].childNodes[0].nodeValue;
//also i am trying to print the read value in the div tag
document.getElementById('displayareacode').innerHTML=message[i];
}
i dont want to overwrite the values they should be one below the other
Like this:- Based on search criteria.
00/000/00
40/111/00
30/99/20
10/090/50
50/060/00
80/600/05
please help.