This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Has anybody attempted to emulate behaviour of a scrollbar using DHTML.. i know that it is done automatically but i need to emulate the behaviour of a scrollbar so as to avoid loading a page with lots of data...
Yes it is possible to make a scrollbar with DHTML, but I am not sure what you are trying to accomplish... Eric
Joined: Feb 13, 2001
I have a lot of data to be shown..say for example 100 records..instead of showing 100 records at a time( page loading time is a nightmare), i want to be able to just show one row..emulate a scrollbar using DHTML and control the row to be shown based on position etc....( FYI,i will fetch data using a hidden frame in the page from the session) ?
There are many UI metaphors that are better suited to this usage than scrolling. The mechanism of "paging" a subset of the rows has been discussed many times in these forums (do a search and you'll find a multitude of info). The request/response cycle is way too slow for a scroll emulation to be effective. The user is conditioned for scrolling to be fast; going back to the database and server for every scroll position change will not be a satisfying experience. Paging, on the other had, will not befuddle the user as much since a delay between pages is expected. my 2 cents, bear
I am trying to use the paging paradigm as well..the page i am trying to display might have 100's of records..so i plan to store the first set in session and emulate a scrollbar as well to reduce page loading time...so i guess the delay would not be that bad...or do u think that this might be an overkill ???
Joined: Nov 08, 2001
No matter what you do, You are going to have to wait for all the records to load. Either it will be in chuncks or the whole thing at once. You can not just say download the part that is visible untilk it scrolls, it will do the whole thing. With the scrollbar, it wiill be choppy and people expect smoothness. Since when it scrolls you are going to have to send information to the server and say you want records X1 - X2. The next time it is scrolled, the request would have to be from X2 - X3. Which means the page has to be rewritten. I persoannly would do it the way a search egine would do it, or the way this forum does it and break it up into pages. Eric