473,231 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Ticker dosn't work with Netscape and Mozilla

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>

Jul 23 '05 #1
4 1793
"Nariak" <Ra*******************@t-online.de> wrote in message
news:d1*************@news.t-online.com...
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>


[snip]

Will this help?

http://www.permadi.com/tutorial/jsTypewriter/

Note: innerHTML is not part of W3C DOM standard and might be depreceated in
the future. An example of doing the same thing as above in W3C DOM is like
below:

document.getElementById("swappable").replaceChild(
document.createTextNode("Good evening"),
document.getElementById("swappable").childNodes[0]);

That piece of code will place the text "Good evening" as the first child
element of the DIV element. To include the html tags, such as <B>, you'll
need to create another node and make the text a child of that node.
Obviously, much more effort will be required.
Jul 23 '05 #2

"McKirahan" <Ne**@McKirahan.com> schrieb im Newsbeitrag
news:du********************@comcast.com...
"Nariak" <Ra*******************@t-online.de> wrote in message
news:d1*************@news.t-online.com...
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>


[snip]

Will this help?

Not really! I don't know what you mean!
http://www.permadi.com/tutorial/jsTypewriter/ Nice Site!!! This stuff will help me!
Thanks!!!
Note: innerHTML is not part of W3C DOM standard and might be depreceated in the future. An example of doing the same thing as above in W3C DOM is like below:

document.getElementById("swappable").replaceChild(
document.createTextNode("Good evening"),
document.getElementById("swappable").childNodes[0]);

That piece of code will place the text "Good evening" as the first child
element of the DIV element. To include the html tags, such as <B>, you'll
need to create another node and make the text a child of that node.
Obviously, much more effort will be required.

Jul 23 '05 #3
McKirahan wrote:
"Nariak" <Ra*******************@t-online.de> wrote in message
news:d1*************@news.t-online.com...
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>


[snip]

Will this help?

http://www.permadi.com/tutorial/jsTypewriter/

Note: innerHTML is not part of W3C DOM standard and might be depreceated in


If it's not part of the standard, how can it be depreciated? :-o
the future. An example of doing the same thing as above in W3C DOM is like
below:

document.getElementById("swappable").replaceChild(
document.createTextNode("Good evening"),
document.getElementById("swappable").childNodes[0]);


Can also just change the text node's value:

<span id="z">blah</span>

<input type="button" value="Change the text" onclick="
document.getElementById('z').firstChild.data = 'new stuff';
">
<input type="button" value="Add some text" onclick="
document.getElementById('z').firstChild.data += 'more text';
">

Provided 'z' has a text node as the first child initially.
--
Zif
Jul 23 '05 #4
DU
Nariak wrote:
Dear friends of programming!

the script below only works with MSI and Opera but not with Netscape 7.x and
Mozilla 1.x!

Just want to add to Zifud excellent post. Mozilla as soon as revision
version 1.5 supports DOM 3 textContent attribute which is the exact
equivalent to MSIE's innerText.

Also, DevEdge used to have excellent articles on news tickers:

Cross-browser and web standard compliant Stock Ticker example
(http://devedge.netscape.com/toolbox/.../stock-ticker/)
for now, accessible at:
http://web.archive.org/web/200402021.../stock-ticker/

Comprehensive W3C web standard compliant alternative to <marquee>
http://devedge.netscape.com/toolbox/.../xb/xbMarquee/
http://web.archive.org/web/200402020.../xb/xbMarquee/

Note that ticker and DHTML marquee annoy users because they interfere
with peripherical vision, usually the user can not slow them down or
turn them off: so generally, they annoy users while taking, using
considerably a lot of user's system resources (cpu and RAM).

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.6 :)
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
4
by: Steven Green | last post by:
I did a clean install of Windows XP on my computer and my javascript will not work. I've tried all types of browsers, I've download the Service pack 1 for XP and IE. I have download java from...
3
by: Edwin Boersma | last post by:
Hi, I've just installed Netscape 7.1 for Linux and the following script refuses to open a window when I call this function: function OpenLinkWindow() { ...
2
by: SabMan | last post by:
I understand that document.layers is no longer supported in Netscape 7.1 but I am not sure on how to fix the code so that it will work with Netscape 7.1. I understand that document.all is no...
6
by: anon | last post by:
How *EXACTLY* does Smart Navigation work? (I would really really really like for this Smart Navigation to work in Mozilla.) The inner workings and the code is what I am looking for. Does it...
2
by: kelvin | last post by:
Hi, I've this piece of code which does not work at all. Can anyone point out my mistake? I've 2 buttons. History button will call verifyFields() function and lead to different page for...
2
by: Evan Wong | last post by:
I have problem to get onkeyup event. If we put the event in HTML statement like - "<input name=field1 size=16 onkeyup="javascript:function1();>" it works. If we put in JavaScript code like...
3
by: Dan | last post by:
Hi Does anyone know of a good Javascript typewriter ticker that allows you to insert HTML into the ticker. I have found lots but when HTML is inserted, the ticker pauses at the point it reaches...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.