Dynamically add element in JS to XUL

Shashidhara

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);
    }
Shashidhara

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Dynamically add element to layout

From Dev

JAXB add element dynamically

From Dev

Dynamically add/remove element

From Dev

Dynamically add dropzone.js div element to the form

From Dev

How to add mouseenter event for dynamically added element with native JS

From Dev

How to dynamically add element with tabs in the list. Angular js

From Dev

react.js - how to add element on success in dynamically generated button?

From Dev

Add class to dynamically added element

From Dev

Dynamically add specific attr to element

From Dev

Dynamically add element to XML file

From Dev

Add element on top of image dynamically

From Dev

Dynamically add element using angularJS

From Dev

Add element on top of image dynamically

From Dev

dynamically add attribute to child element

From Dev

Writing Addon to Firefox with XUL and JS

From Dev

Form button add dynamically in JS

From Dev

Dynamically add data to a js object

From Dev

add width to an element with js

From Dev

How to add CSS class dynamically to html element

From Dev

How to add dynamically extended element with Polymer?

From Dev

Create div element and dynamically add child elements on it

From Dev

Add data to dynamically created element and bind event

From Dev

check if span element exists and then add div dynamically

From Dev

How to dynamically add a directive to an input element in AngularJS

From Dev

Add multiple html element dynamically using jquery

From Dev

Dynamically add angular attributes to an element from a directive

From Dev

jQuery: Dynamically add class that belongs to another element

From Dev

Add list elements dynamically to ul element

From Dev

How to add canvas to div element dynamically?

Related Related

HotTag

Archive