When I run following code to display result for multiple USN(University Seat Number), it will display all at once when the result for all usn is loaded.. What I need is to display the result for each usn as soon as it is downloaded and send next request with next USN.
Here loadResult(usnList[u]) function will send request to external University site..
for(var u=0; u<usnList.length; u++)
{
listitem = document.createElement("listitem");
listcell1 = document.createElement("listcell");
listcell2 = document.createElement("listcell");
listcell1.setAttribute("label", usnList[u]);
listcell2.setAttribute("label", "Loading");
listcell2.setAttribute("id", "id"+usnList[u]);
listcell2.setAttribute("label", status);
status=loadResult(usnList[u]);//Load result with one USN
listitem.appendChild(listcell1);
listitem.appendChild(listcell2);
listbox.appendChild(listitem);
}
Its simple, I fixed this problem.. What i did is that, instead of returning the status result from loadResult function, I display it in same function by using the element-ID..
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments