• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Pushing out html as and when ready (table)

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have an app which returns a DOM back as an AJAX response. I loop through the result and populate the results in a table by dynamically inserting rows in the table.

My Issue is the browser becomes unresponsive and waits for the loop to complete and once all the records are inserted, only then it shows all records. Its not a very major hit .. but is there any way i can make the rows visible as and when one iteration of the javascrpt loop is completed. i.e one row in inserted in the table.?

here is the manner in which the rows are inserted. (not actual code just logic)

for all the records
insertRow in the table tbody
insertCell in the rows
end for..
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into making a loop with setTimeout. It will not freeze the browser.

Eric
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic