[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JavaScript Digest V001 #66



I have seen alot of postings about people using Marquees (scrolling text) 
in the text input form element.  I wrote my own little applet a week or so 
ago, and I like it because:
1. It doesn't suffer from memory problems,
2. No dynamic spacing or anything like that,
3. It works no matter what the string size is (aka to change the string 
all you have to do is change the string!),
4. Variable speed
  I think (not that I'm boasting, just trying to be 
logical) that it's the best to use.  Feel free to steal it!

<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
// Marquee function originally written and debugged by Rick Osborne,
// oz@grove.ufl.edu - March 3, 1996

tx = "Welcome to Rick's Home Page!! - " 
i=-1;
ttx=tx;
function showmarquee () {
 i++;
 if (i>(tx.length-1)) {i=0;};
 if (i>0) {ttx = tx.substring(i,tx.length)+tx.substring(0,i);}
  else {ttx=tx;};
 document.marquee.face.value = ttx;
 timerID = setTimeout("showmarquee()",200);
}
// -->
</SCRIPT>
<form name="marquee" onSubmit="0">
<input type="text" name="face" size=50 value="">
</FORM>

There you go!

Matt Smith for President in 2024!  (for info: mwsmith@clemson.edu)
___________________________________________________________________________
Rick Osborne         oz@grove.ufl.edu             http://grove.ufl.edu/~oz/
Want help on writing HTML?  Want to know what I want for my birthday?  Well
I've decided to start my own mini-listserver here, so send me an email with
GET LISTINFO for the subject for instructions on how to get the answers!
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/