M
Mr. Land
I have a large list of options to offer for selection on a Web page.
Loading an ordinary SELECT element with all the options beforehand
results in it taking far too long to load the page.
I found a technique using an HTML table inside a scrollable DIV to
initially load a small set of the options, then asynchronously fetch
more options using Javascript as the user scrolls to near the bottom
of the DIV. As more "packets" of options are fetched, they are
appended to the HTML table.
This works, but the time required to append the additional options
increases by 2-4 seconds at each fetch.
I'm not sure why, but it appears as if the number of existing rows in
the table is affecting the time it takes for more rows to be added
(I'm always adding the same number of additional rows.)
Any ideas on why this may be happening and how to circumvent it?
Thanks for any help/ideas.
Loading an ordinary SELECT element with all the options beforehand
results in it taking far too long to load the page.
I found a technique using an HTML table inside a scrollable DIV to
initially load a small set of the options, then asynchronously fetch
more options using Javascript as the user scrolls to near the bottom
of the DIV. As more "packets" of options are fetched, they are
appended to the HTML table.
This works, but the time required to append the additional options
increases by 2-4 seconds at each fetch.
I'm not sure why, but it appears as if the number of existing rows in
the table is affecting the time it takes for more rows to be added
(I'm always adding the same number of additional rows.)
Any ideas on why this may be happening and how to circumvent it?
Thanks for any help/ideas.