[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Status Banner
I am a bit of a novice (less than 24 hours) at JavaScript but 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);
}
// -- End of JavaScript code -------------- -->
</SCRIPT>
--
Nick Howden Phone: +44 1684 895566 Nick.Howden@rivers.dra.hmg.gb
N-137, D R A, St Andrews Road, Great Malvern, WR14 3PS, England, UK