C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Scrolling Date in the Status Bar using Javascript


Posted Date: 07 Jul 2008    Resource Type: Code Snippets    Category: Javascript
Author: Jaya KumarMember Level: Gold    
Rating: Points: 10



This code sample is a javascript code that enables the status bar to display current date in a scrolling fashion.

The code can be tested by using it on a simple HTML page.


<script language="javascript" type="text/javascript"/>
function statusbar(val)
{
var today = new Date();
var display = today.toLocaleString();
var msg = display;

var res = " ";
var speed = 100;
var pos = val;

if (pos > 0) {
for (var position=0 ; position < pos; position++) {
res += " ";
}
res+=msg;
pos--;
window.status = res;
timer = window.setTimeout("statusbar("+pos+")",speed);
}
else{
if( -pos < msg.length) {
res += msg.substring(-pos,msg.length);
pos--;
window.status=res;
timer = window.setTimeout("statusbar("+pos+")",speed);
}
else
{
window.status= " ";
timer = window.setTimeout("statusbar(100)",speed);
}
}
}
statusbar(100);
</script>




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Status bar contains date  .  Scrolling date in status bar  .  Displaying text in status bar  .  Displaying scrolling date in status bar  .  Display date in status bar  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Image Zoom-in and Zoom-out Using Java Script
Previous Resource: Number to Word Converter in Javascript
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use