Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FP2000: How to Create a Scrolling Message in Browser's Status Bar


View products that this article applies to.

This article was previously published under Q213872

For a Microsoft FrontPage 98 version of this article, see 194155 (http://support.microsoft.com/kb/194155/EN-US/ ) .
For a Microsoft FrontPage 97 version of this article, see 167596 (http://support.microsoft.com/kb/167596/EN-US/ ) .

↑ Back to the top


Summary

This article provides a sample FrontPage Java script that displays a custom, scrolling message in the Internet Explorer status bar.

↑ Back to the top


More information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Example

Insert the following script in the
<head>
section of your HTML Web page:
  <script Language="JavaScript">
 	// Scrolling text string.
	var strText="This is a scrolling message!"; 
	// Length of the text
	var intText=strText.length; 
	// Speed of the scroll 
	var intSpeed=25; 
	// Width of the scrolling area.
	var intWidth=100; 
	var intPos=1-intWidth;
         function scroll()
         {
           // Initialize the string to be printed.
           intPos++;
           var strScroll="";
           // Move to the right in the string.
           if (intPos==intText)
           {
             // Start over if the string is done.
             intPos=1-intWidth;
           }
           // Scrolling
           if (intPos<0)
           {
           // Add spaces to beginning if necessary.
			 for (var i=1; i<=Math.abs(intPos); i++)
             {
               strScroll=strScroll+" ";
             }
             strScroll=strScroll+strText.substring(0, intWidth-i+1);
           }
           else
           {
           strScroll=strScroll+strText.substring(intPos,intWidth+intPos);
           }
           window.status = strScroll;
           setTimeout("scroll()", intSpeed);
         }
 </script>
				
In order for the message to function, modify the <BODY> tag so that it looks like this:
<BODY onload="scroll()">
				

↑ Back to the top


Keywords: KB213872, kbinfo

↑ Back to the top

Article Info
Article ID : 213872
Revision : 2
Created on : 6/18/2005
Published on : 6/18/2005
Exists online : False
Views : 252