[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Status Banner
> I am curious
> >why scripts to write text to the Status bar were many lines long when a
> >function such as my banner() below will do the trick in 3 lines.
> >
> >Am I missing something obvious that means I will be asking for trouble later?
> >
> >
> ><SCRIPT LANGUAGE="JavaScript">
> ><!-- Beginning of JavaScript Applet -------------------
> >
> >var Text = "...Visit the Toc H Home Pages @
> http://www.phon.ucl.ac.uk/home/dave/TOC_H/index.html.....";
> >var Speed=100
> >
> >
> >function banner() {
> >var TimerId
> > window.status=Text;
> > Text = Text.substring (1, Text.length) + Text.substring (0, 1)
> > TimerId = setTimeout("banner()", Speed);
>
> This is essentially what I have with my frame banner (I have other stuff to
> stop and start the scroll, change the color and font size, etc, but the text
> display uses this same approach), and I don't believe it's asking for trouble.
>
> -- Gordon
Mine is also somewhat the same. I turn the msg string into a loop. I
agree. Passing arguments (poor Mr. Stack), and if this...then
that...else something else sounds like band aid code to me.
John
--------------------------------------------------------------------
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/