473,699 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="javas cript" 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,Hel vetica,MS Sans Serif"><strong> <font
color="red" size=-1>'+text.substr ing(0, pos)+'</strong></font>';
if(navigator.ap pName=="Netscap e")
with(document.t icker.document)
{
open(); write(out); close();
}
else
ticker.innerHTM L=out;

pos+=dir;

if(pos>text.len gth)
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+','+di r+')', delay*3);
}
}
//-->
</script>
</head>
<body onload="start_t icker()">
<table><tr><t d align="center" valign="middle" ><div
id="ticker"></div></td></tr></table>
</body>
</html>

Jul 23 '05 #1
4 1815
"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="javas cript" 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,Hel vetica,MS Sans Serif"><strong> <font
color="red" size=-1>'+text.substr ing(0, pos)+'</strong></font>';
if(navigator.ap pName=="Netscap e")
with(document.t icker.document)
{
open(); write(out); close();
}
else
ticker.innerHTM L=out;

pos+=dir;

if(pos>text.len gth)
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+','+di r+')', delay*3);
}
}
//-->
</script>
</head>
<body onload="start_t icker()">
<table><tr><t d 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.getEle mentById("swapp able").replaceC hild(
document.create TextNode("Good evening"),
document.getEle mentById("swapp able").childNod es[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******** ************@co mcast.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="javas cript" 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,Hel vetica,MS Sans Serif"><strong> <font
color="red" size=-1>'+text.substr ing(0, pos)+'</strong></font>';
if(navigator.ap pName=="Netscap e")
with(document.t icker.document)
{
open(); write(out); close();
}
else
ticker.innerHTM L=out;

pos+=dir;

if(pos>text.len gth)
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+','+di r+')', delay*3);
}
}
//-->
</script>
</head>
<body onload="start_t icker()">
<table><tr><t d 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.getEle mentById("swapp able").replaceC hild(
document.create TextNode("Good evening"),
document.getEle mentById("swapp able").childNod es[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="javas cript" 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,Hel vetica,MS Sans Serif"><strong> <font
color="red" size=-1>'+text.substr ing(0, pos)+'</strong></font>';
if(navigator.ap pName=="Netscap e")
with(document.t icker.document)
{
open(); write(out); close();
}
else
ticker.innerHTM L=out;

pos+=dir;

if(pos>text.len gth)
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+','+di r+')', delay*3);
}
}
//-->
</script>
</head>
<body onload="start_t icker()">
<table><tr><t d 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.getEle mentById("swapp able").replaceC hild(
document.create TextNode("Good evening"),
document.getEle mentById("swapp able").childNod es[0]);


Can also just change the text node's value:

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

<input type="button" value="Change the text" onclick="
document.getEle mentById('z').f irstChild.data = 'new stuff';
">
<input type="button" value="Add some text" onclick="
document.getEle mentById('z').f irstChild.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
5033
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 (preg_match("/Mozilla/i", $info)) {
4
13653
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 Sun, which I know is not javascript but it could not hurt. I have done everything I know of to fix this problem but still Javscript will not work on my windows XP. I don't know where to turn from here, Microsoft surely does not have any info about...
3
10177
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() { wMap=window.open('http://naxos.orangeport.net/cyclades-info/ShowMap.php?id_advert=45&map=','','width=400,height=600'); wMap.onResize = 'self.location.href=http://naxos.orangeport.net/cyclades-info/ShowMap.php?id_advert=45&map='
2
2197
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 longer supported in IE6 but I am not sure on how to fix the code so that it will work with IE6. <!--
6
2003
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 use JavaScript? If so, is there any code that someone can point to. And can the ASP.NET 2.0 team get this work in Mozilla....sort of targeting multiple browser like they do with other stuff already....It would be a really big boost to them,...
2
2416
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 processing. verifyFields() is working fine and so does the history() function.
2
18446
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 this var oElmt = document.createElement("input"); :
3
6678
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 the HTML as well as applying the formatting. I need one whose character timer ignores characters in tags. I need to apply font color and weight styling to different words. Please see www.launchpr.co.uk for how the ticker currently looks in
10
2369
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 = navigator.appName;
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9034
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.