JavaScript Message Marquee at Status Bar of web browser

E-mail Print PDF

JavaScript Message Marquee at Status Bar of web browser

With the help of JavaScript we can add our favorite message with marquee effect. First of all JavaScript Message Marquee at Status Bar of web browser.

For that we create an object with a constructor, a special type of function that prepares a new object for use by initializing the memory it takes up. Objects are created by applying the new operator to their constructors. This operator causes the constructor to which it is applied to create a brand-new object, and the nature of the object that is created is determined by the particular constructor that is invoked. Here we creates a new setStatusmessage() object and places a reference to it in the variable scroll. Here we define function function scroller() which scroll our message. Here first we add blank spaces before message and reduce one space per loop. And refresh status message by setTimeout('scroller()',scroll.delay). After shift all message by scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length). Then we make message again ready to scroll.

// More JavaScript - Visit: http://www.xfunda.com/
// JavaScript Message Marquee at Status Bar of web browser
<!--
var scroll = new setStatusmessage() 
 
function setStatusmessage() {
this.msg = "This is Scrolling Message...!!!"
this.out = " "
this.pos = 100 // how wide is the scroller?
this.delay = 50 // milliseconds between shifts
this.i = 0

 
function scroller() {
for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) {
scroll.out += " "

 
if (scroll.pos >= 0)
scroll.out += scroll.msg
else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)
window.status = scroll.out
scroll.out = " "
scroll.pos--
if (scroll.pos < -(scroll.msg.length)) {
scroll.pos = 100
}
setTimeout ('scroller()',scroll.delay)
}
scroller()
// -->

JavaScript Message Marquee at Status Bar of web browser
JavaScript Message Marquee at Status Bar of web browser

Implementing Script

Implementation of script is quite simple just copy it and paste it any where in <head>--</head> or <body>--</body> section of your webpage.

 

Trackback(0)
Comments (0)Add Comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
Last Updated ( Saturday, 16 May 2009 18:00 )  

Who's Online

We have 19 guests online

Subscribe Feeds

Enter your email address:

Sponsor Adds



Submit Article

We want to develop such a Community portal which will provide a good resource on latest hot technologies such as .NET, VB.NET, C#.NET, ADO.NET, ASP.NET, PHP, Flash, Photoshop. If you like to write for us, this guideline for you. please send your article, faqs on admin[at]xfunda.com

Adobe Gallery Photoshop Tutorials...

Navi Avatar Photo Manipulation with Photoshop Navi Avatar Photo Manipulation with Photoshop Navi Avatar Photo Manipulation with Photoshop Categoty - Photoshop >> Photo Effects. ...
 
Gunshot Through a Glass Photoshop Tutorial Gunshot Through a Glass Photoshop Tutorial Gunshot Through a Glass Photoshop Tutorial Categoty - Photoshop >> Photo Effects. ...
 
How to Create an Abstract Image in Photoshop How to Create an Abstract Image in Photoshop How to Create an Abstract Image in Photoshop Categoty - Photoshop >> illustration and Art. ...
 
How to Create a Clean 3D Notepad in Photoshop How to Create a Clean 3D Notepad in Photoshop How to Create a Clean 3D Notepad in Photoshop Categoty - Photoshop >> illustration and Art. ...
 
Create an Amazing website Layout Using Textures Create an Amazing website Layout Using Textures Create an Amazing website Layout Using Textures Categoty - Photoshop >> Website Designing. ...