473,395 Members | 1,931 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,395 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 1795
"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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.