aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Emulating Scrollbar behaviour Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Emulating Scrollbar behaviour" Watch "Emulating Scrollbar behaviour" New topic
Author

Emulating Scrollbar behaviour

Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
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...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Yes it is possible to make a scrollbar with DHTML, but I am not sure what you are trying to accomplish...
Eric
Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
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) ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61773
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
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 ???
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
Satish Gopalakrishnan
Ranch Hand

Joined: Feb 13, 2001
Posts: 52
Thanks for the help and the suggestions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Emulating Scrollbar behaviour