Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrolling text on window frame

Status
Not open for further replies.

StressedTechie

Technical User
Joined
Jul 13, 2001
Messages
367
Location
GB
I want to put a scrolling copyright type message that appears on the window frame (not sure what you call it). I have seen it done in a template once but I cant remeber how the person did it. I viewed the source and amended but cant find it.

Can anyone help me!

Hope you can understand what I want to do.....

Thanks

 
You mean in the status bar??
Use this:
Code:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function snapIn(jumpSpaces,position) { 
  var msg = &quot;Welcome to My Homepage!&quot;; 
  var out = &quot;&quot;; 

  for (var i=0; i<position; i++) { 
    out += msg.charAt(i) 
  } 
  for (i=1;i<jumpSpaces;i++) { 
  out += &quot; &quot; 
  } 
  out += msg.charAt(position); 

  window.status = out; 
  if (jumpSpaces <= 1) { 
    position++; 
  if (msg.charAt(position) == ' ') { 
    position++ 
  } 
  jumpSpaces = 100-position 
  } 
  else if (jumpSpaces >  3) { 
  jumpSpaces *= .09 
  } 
  else { 
  jumpSpaces-- 
  } 
  if (position != msg.length) { 
    var cmd = &quot;snapIn(&quot; + jumpSpaces + &quot;,&quot; + position + &quot;)&quot;; window.setTimeout(cmd,10); 
  } 
  return true 
}
</SCRIPT>
And call this in the: <body onLoad=&quot;snapIn(50,0)&quot;> ok??

This will display the message in the browser status bar...I didn't write this script, I came across it while surfing the net...but its a good script...
Hope this helps ya... I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top