New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact
Categories
Other Sections
Sweet Ads
Compatibility
Bookmark online:

FF1+ IE5+ Opr7+

Memory Ticker

Author: Dynamic Drive

Description: This thoughtful DHTML ticker remembers the last viewed message just before the visitor navigates to another page, and upon his return (within the same browser session), picks up the message display from where it last left off. For tickers that contain many messages, it quickly becomes an indispensable feature. The script saves the last viewed message when one of the following two actions occur on the page:

1) When the page is unloaded in general, and the visitor goes to another page, OR
2) When the scroller is clicked on, and the user unloads the page that way.

Which action to adopt is up to you.

Memory Ticker works in all modern DHTML browsers- IE5+, NS6+, and Opera 7+. In IE5.5+, an optional "fading" effect is applied between image changes. Furthermore, all of the visual styling for this script is done via CSS, making it easy to customize. Yes, we're just too thoughtful!

Demo: Make a note of the current message, and try reloading the current page or going to another URL then returning. The scroller will continue with the last message viewed.


Directions Developer's View

Step 1: Insert the below style sheet into the HEAD section of your page, which controls most visual aspects of the ticker:

Select All

Step 2: Insert the below script where you wish the ticker to appear on your page:

Select All

Configuring the ticker

Edit the CSS of Step 1 to modify the general look of the ticker. Then, customize the variables of Step 2 per the comments. One variable that requires a bit of elaboration is:

var persistmsgbehavior="onload" //set to "onload" or "onclick".

As explained briefly in the Introduction, this script can remember the last viewed message in two different ways. Set "persistmsgbehavior" to "onload" to inform script to save last viewed message whenever the page unloads and the visitor is taken to a different page in general. Set "persistmsgbehavior" to "onclick" instead if you only wish last viewed message to be saved if the visitor clicks a message inside the ticker and unloads the page that way. In other words, only when the visitor interacts with the ticker. If you're confused which method to choose, in most cases, the default "onload" will do nicely.