spacer
Yehuda Shiran April 19, 2000
A Scrolling Algorithm
Tips: April 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Scrolling HTML is an efficient way to display more information in less space than static HTML can, and can be used for many purposes including news, sports, and stock information.

The following diagram explains the scrolling algorithm. We have two pages, firstPage and secondPage. Each of the pages loads the external HTML file and scrolls up, one after the other. The pages are changing relative positions every cycle. A cycle begins when the page's top line starts scrolling out of the box, and ends when the page's bottom line scrolls out. During the first cycle, the firstPage is in the upperPage position, while the secondPage is in the lowerPage position. They switch positions on the second cycle: the secondPage is in the upperPage position, while the firstPage is in the lowerPage position. The canvas is the window through which the scrolling text is shown. Here is the diagram:

Learn more about our browser-independent scroller in Column 32, Scrolling HTML Basics, Part III: The Cross-Browser Version.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles · Object Oriented Programming- The Banking Application - Login
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Create In-Memory ADO Recordsets · Keep Malware Off Your PC With Sandboxie · Time-Saving Web Tools and Resources for Your Business