N
Nariak
Dear friends of programming!
the script below only works with MSI and Opera but not with Netscape 7.x and
Mozilla 1.x!
What is wrong?
Please help me!
Thanks Ralf
###########################################
....
<head>
<script language="javascript" type="text/javascript">
<!--
var delay=30;
var nextm=0;
var msg=new Array
(
'Ab sofort wieder täglich geöffnet! ',
'Montag bis Sonntag von 10 bis 23 Uhr ',
'JETZT MIT GROSSER TERASSE ! ! ! '
);
function start_ticker() {
do_ticker(msg[0], 0, 1);
}
function do_ticker(text, pos, dir) {
var out='<font face="Arial,Helvetica,MS Sans Serif"><strong><font
color="red" size=-1>'+text.substring(0, pos)+'</strong></font>';
if(navigator.appName=="Netscape")
with(document.ticker.document)
{
open(); write(out); close();
}
else
ticker.innerHTML=out;
pos+=dir;
if(pos>text.length)
setTimeout('do_ticker("'+text+'",'+pos+','+(-dir)+')', delay*1);
else
{
if(pos<0)
{
if(++nextm>=msg.length)
nextm=0;
text=msg[nextm];
dir=-dir;
}
setTimeout('do_ticker("'+text+'",'+pos+','+dir+')', delay*3);
}
}
//-->
</script>
</head>
<body onload="start_ticker()">
<table><tr><td align="center" valign="middle"><div
id="ticker"></div></td></tr></table>
</body>
</html>
the script below only works with MSI and Opera but not with Netscape 7.x and
Mozilla 1.x!
What is wrong?
Please help me!
Thanks Ralf
###########################################
....
<head>
<script language="javascript" type="text/javascript">
<!--
var delay=30;
var nextm=0;
var msg=new Array
(
'Ab sofort wieder täglich geöffnet! ',
'Montag bis Sonntag von 10 bis 23 Uhr ',
'JETZT MIT GROSSER TERASSE ! ! ! '
);
function start_ticker() {
do_ticker(msg[0], 0, 1);
}
function do_ticker(text, pos, dir) {
var out='<font face="Arial,Helvetica,MS Sans Serif"><strong><font
color="red" size=-1>'+text.substring(0, pos)+'</strong></font>';
if(navigator.appName=="Netscape")
with(document.ticker.document)
{
open(); write(out); close();
}
else
ticker.innerHTML=out;
pos+=dir;
if(pos>text.length)
setTimeout('do_ticker("'+text+'",'+pos+','+(-dir)+')', delay*1);
else
{
if(pos<0)
{
if(++nextm>=msg.length)
nextm=0;
text=msg[nextm];
dir=-dir;
}
setTimeout('do_ticker("'+text+'",'+pos+','+dir+')', delay*3);
}
}
//-->
</script>
</head>
<body onload="start_ticker()">
<table><tr><td align="center" valign="middle"><div
id="ticker"></div></td></tr></table>
</body>
</html>