Help with scrolling text Java...

liunx

Guest
Okay,I don't know -any- lingo for this stuff so excuse me for getting it wrong.At the bottom of one's browser they have the loading bar that should normaly say done in the corner.( In the eyes of IE,I don't bother with netscape) My friend gave me code to have text scroll across then stop at the end.But it's not working. Here's my website. (<!-- m --><a class="postlink" href="http://www.zerothelegend.netfirms.com">http://www.zerothelegend.netfirms.com</a><!-- m -->) Check the source code,near the top,should be my java script,tell me what I'm doing wrong...I can post the code later,if somehow my site wont show it. -.-;; Thanks.<!--content-->no scroller here<br />
<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><br />
<HTML><HEAD><br />
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD><br />
<BODY></BODY></HTML><!--content-->Through some chatting on my own with him, I've got this code, which works. It makes the letters of a custom phrase 'fall in', appearing from the right, in the Status Bar. Originally his problem was not knowing how to call a function.<br />
<br />
I know how to make work once. I use this code:<SCRIPT LANGUAGE="JavaScript"><br />
<!--<br />
snapIn(1, 1)<br />
//--><br />
</SCRIPT>Now he would like to loop infinitely. What code do you need additionally, and does it matter where this code is posted in the HTML page (can it all be in the header)? It would be nice if you could put in X number seconds before it repeats. And you could put in 0 seconds if you want it to repeat right away.<br />
<br />
Change Status Bar, that normally says "Done.", to custom phrase<br />
<SCRIPT LANGUAGE="JavaScript"><br />
<!--<br />
// Following COPYRIGHT ?997 Dennis & Family. All Rights Reserved.<br />
function snapIn(jumpSpaces,position) { var msg = "Welcome to Misatos' N.E.R.V-A"; var out = ""; for (var i=0; i<position; i++) { out += msg.charAt(i) } for (i=1;i<jumpSpaces;i++) { out += " " } 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 = "snapIn(" + jumpSpaces + "," + position + ")"; window.setTimeout(cmd,10); } return true }<br />
//--><br />
</SCRIPT><!--content-->
 
Back
Top