A much better approach, which is covered by a JSP FAQ, would be to do your "paging" at the database rather than at the browser. Why waste resources to fetch and transfer 3000 records when you only need 10?
It is a requirement from business and they need to see 3000 records in 1 shot no matter. So I need to show 3000 and they also requested that we show about 30 records initially along with a progress bar so user knows something is going on.. Any ideas how to make javascript print a part of it and then continue processing the rest?
It works when I show a alert statement.. but stops working when i remove the alert.
Bear Bibeault
Author and opinionated walrus
Marshal
alerts should be avoided because they cause unnatural pausing of script.
First, I'd push back on the rather silly requirement. No one is going to find 3000 records at a time useful. Failing to stem the stupidity, I'd employ Ajax to fetch the data in chunks at intervals.
subject: display few records before JSP loads the rest