>> Home > Resources > Scrolling Ticker in JavaScript

[image]
[image]
  SEARCH
 

[image]





 

Create a Scrolling News Ticker in JavaScript


  This document describes how to Create a Scrolling News Ticker in JavaScript. The script is compatible with both Internet Explorer 5.x or later (IE) and FireFox (FF).

    Scrolling News Ticker      You can add this ticker in your own web pages.      Free      You can add it for free, in exchange of a link to this page.      Desktop News Ticker      And why not to offer to your visitors your own Desktop News Ticker? This is the perfect tool to attract and keep visitors... More info 

You can add this scrolling news ticker with your own text in your web pages.

Features:

[image] Easy to embed into an HTML document;
[image] Compatible with Internet Explorer and FireFox;
[image] Full JavaScript: no plugin, no Java, no ActiveX;
[image] Supports full HTML, including images, links and any other tags;
[image] Smooth scrolling;
[image] Very small script - fast to download;
[image] Easy to customize;
[image] Free for personal and commercial use.

If you want a downloadable Desktop News Ticker instead of or in addition to your web based scrolling ticker:
[image]  How to create a Desktop News Ticker
[image]  Desktop News Ticker Solution


[image]Free News Ticker in JavaScript for web site[image]

  The script is free for personal and commercial use. We would appreciate a small text/links to be displayed in the pages where the ticker is shown:

Scrolling News Ticker by Mioplanet        < Get HTML Code  

Copy this code and paste it in your HTML document

[image]The News Ticker JavaScript Code[image]

  The JavaScript source code for the scrolling ticker is stored in a .js file - download (zip - 0,7 Kb).

To include a ticker in an HTML document, put the .js file in the same folder than your HTML document and add the following code where you want the ticker to be visible:

My First Ticker!


If you want the scrolling to stop when the mouse is over it, try this code instead:

My First Ticker!


Here is an HTML document displaying the scrolling ticker:

My First Ticker!


[image]Setting Options in the JavaScript Source Code[image]

  You can edit the file webticker_lib.js and change the values for the following variables:



[image]TICKER_RIGHTTOLEFT

Set to true if the text is in Arabic, Hebrew or other right-to-left writing language.

[image]TICKER_SPEED

Set the scrolling speed. Default value is 2.

[image]TICKER_STYLE

Set the default style for the scrolling text.

[image]TICKER_PAUSED

When this variable is set to true, the scrolling ticker is paused.
This value can be changed at runtime, for example when the mouse is over the ticker.

[image]RSS or XML Data Source[image]

  The scrolling text can be imported from any source: RSS, XML or any other format.

For example, if you want to import data using PHP to convert it into a single HTML line to be displayed by the ticker, create a php script to import and convert the data, and include it directly in the DIV tag as follow:

include "myimportlib.php" ?>


[image]Resources[image]



[image]
© Mioplanet 2008 | 0x33 | Mioplanet Robotics | Docs | Lab | Last update: August 15th, 2008

  [ http://www.mioplanet.com/sys/tasks/tasks.php ]


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser