Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

i am using ul inside the div tag, i want to load the list on demand,
i mean there is scroll at div tag and inside the div tag there
ul items, i don't want to show all the items, because there is huge records(approx 10,000) that degrade the performance of application if we show all the records.
How to implement the load on demand with list items. i want to implement this like a facebook, when user scroll the content start loading?

Note: First time i want to load the list from server.
Scroll is appearing in div tag not at ul tag.
Posted
Comments
Herman<T>.Instance 14-Dec-12 6:01am    
no reposting please

I got understand your expectation.
ok, as per your description you want that there will be a div at the end of like 20 items ok? then after 20 items there will be a div which will contain "see more" button. When any body click the see more button, the next 20 item will show and so on. right..?

ok, first you can make a calculation that how many items you want to show first. you have to maintain a index in database that which cycle data you are fetching. then add see more button with index that which cycle you are selection. when click the see more button then sent the index to database and get the data from database.

in the same way you have to go ahed.


thanks.
Rashed:: Bangladesh.
 
Share this answer
 
The above answer is fairly good. You can also do that when Scrollbar reach to bottom end, just make a Ajax call to the sever to load other items.

There is no meaning of advance, you will need to load the thing automatically when user is interested to see them. You can get user interest by measuring the height of scrollbar.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900