Forum Moderators: open

Message Too Old, No Replies

AJAX innerHTML assignation w/ lots of content stalls browser

"unresponsive script" in FF. Do it incrementally?

         

heisters

7:10 pm on Sep 13, 2006 (gmt 0)

10+ Year Member



Hi all,

I have an XAJAX app that sometimes dumps a good deal of HTML into a div by setting innerHTML. It works fine when there's little content, but when the listing is big (a table w/ ~60,000 rows), Firefox stalls (freezing my loading spinner) and eventually reports an "unresponsive script". Eventually it might work, but the browser becoming unresponsive is no good.

So, what's the recommendation for doing this? I thought I might pass off the XMLHTTPResponse to another function that would feed it out incrementally (maybe with a progress bar), but is that the best way of doing it? Does anyone perhaps know an XAJAX-specific way of doing this?

Thanks!

DrDoc

8:16 pm on Sep 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, feeding out incrementally is probably best. You can always create each row separately, and then use appendChild on the table.