473,587 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript doesn't work in newer Mozillas...

Cat
Greetings,

I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).

What is wrong with it? I'm no javascript expert, I just got it
from the net years ago, I don't even know where from. There is
no source url given in it to look up. I've added the code below.

I have exactly the same situation with two other scripts - they
worked for years and suddenly they seem to be 'expired' for Mozilla.
I think it's the same problem with all, so I hope if someone gives
me a helping hand with this one I might fiddle out the other two
as well.

Sorry for the long babble, and thanks to anyone who has the patience
to look over it,

Cat

<BODY BGCOLOR="#00000 0" ONLOAD="fly()">

<SCRIPT LANGUAGE="JavaS cript">
<!-- Begin
SmallStars = 27;
LargeStars = 3;
SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
ns=(document.la yers)?1:0;
if (ns) {
for (i = 0; i < SmallStars; i++) {
document.write( "<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#EEDBD B'
CLIP='0,0,1,1'> </LAYER>");
}
for (i = 0; i < LargeStars; i++) {
document.write( "<LAYER NAME='ln"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF 0'
CLIP='0,0,2,2'> </LAYER>");
}
}
else {
document.write( '<div style="position :absolute;top:0 px;left:0px">') ;
document.write( '<div style="position :relative">');
for (i = 0; i < SmallStars; i++) {
document.write( '<div id="si"
style="position :absolute;top:0 ;left:0;width:1 px;height:1px;b ackground:#ffff f0;font-size:1px"></div>');
}
document.write( '</div>');
document.write( '</div>');
document.write( '<div style="position :absolute;top:0 px;left:0px">') ;
document.write( '<div style="position :relative">');
for (i = 0; i < LargeStars; i++) {
document.write( '<div id="li"
style="position :absolute;top:0 ;left:0;width:2 px;height:2px;b ackground:#ffff ff;font-size:2px"></div>');
}
document.write( '</div>');
document.write( '</div>');
}
WinHeight =
(document.layer s)?window.inner Height:window.d ocument.body.cl ientHeight;
WinWidth =
(document.layer s)?window.inner Width:window.do cument.body.cli entWidth;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math .random() * WinHeight);
SmallXpos[i] = Math.round(Math .random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math .random() * WinHeight);
LargeXpos[i] = Math.round(Math .random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}
function fly() {
var WinHeight =
(document.layer s)?window.inner Height:window.d ocument.body.cl ientHeight;
var WinWidth =
(document.layer s)?window.inner Width:window.do cument.body.cli entWidth;
var hscrll =
(document.layer s)?window.pageY Offset:document .body.scrollTop ;
var wscrll =
(document.layer s)?window.pageX Offset:document .body.scrollLef t;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math .random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
if (ns) {
document.layers['ln'+i].left = LargeXpos[i];
document.layers['ln'+i].top = LargeYpos[i] + hscrll;
}
else {
li[i].style.pixelLef t = LargeXpos[i];
li[i].style.pixelTop = LargeYpos[i] + hscrll;
}
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math .random()*WinHe ight);
Smallspeed[i] = Math.random() * 5 + 1;
}
if (ns) {
document.layers['sn'+i].left = SmallXpos[i];
document.layers['sn'+i].top = SmallYpos[i]+hscrll;
}
else {
si[i].style.pixelLef t = SmallXpos[i];
si[i].style.pixelTop = SmallYpos[i]+hscrll;
}
}
setTimeout('fly ()', 10);
}
// End -->
</SCRIPT>
Jul 23 '05 #1
8 1492
In article <41************ ***@steppe.mn>, Cat <ca*@steppe.m n> wrote:
Greetings,

I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).


This script contains the Netscape 4.x layer tag. This tag was dropped
from the Gekco base browsers. Netscape 6.x, firefox, etc. This is the
reason for the failure.

Rbert
Jul 23 '05 #2
On Fri, 21 Jan 2005 15:36:03 +0100 Cat wrote:
Greetings, I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).


Maybe due to the ancient ways of doing things.

document.write( '</div>');
document.write( '</div>');
document.write( '<div style="position :absolute;top:0 px;left:0px">') ;
document.write( '<div style="position :relative">');
Convert all of this stuff into css.
<div> should come before </div> not as you show it.

in css it would look like
div.sample { position:absolu te; top:0px; left;0px; }

<div class="sample"> text</div>

You might want to brush up on existing acceptable JS conventions.
Then tweak your script accordingly.
Jul 23 '05 #3
Couple of things: almost no-one is supporting NS 4.x vesions anymore.
It's usage is nominal, anymore, so remove it.

Then what is happening in your script is that the logic checks for old
NS versions (document.layer s), if found, then use these specific old NS
properties, else assume IE and use proprietary IE properties. Newer NS
and Firefox browsers follow the ECMA standards better and don't support
either set of proprietary properties used in your script.

What you should do is search for a whole new script, or go through
manually, and replace anything with document.layers with new code
supported by NS 6+. It would take a long time to be more specific for
this post, but followup on your own and you'll learn a lot along the
way.

Cat wrote:
Greetings,

I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).

What is wrong with it? I'm no javascript expert, I just got it
from the net years ago, I don't even know where from. There is
no source url given in it to look up. I've added the code below.

I have exactly the same situation with two other scripts - they
worked for years and suddenly they seem to be 'expired' for Mozilla.
I think it's the same problem with all, so I hope if someone gives
me a helping hand with this one I might fiddle out the other two
as well.

Sorry for the long babble, and thanks to anyone who has the patience
to look over it,

Cat

<BODY BGCOLOR="#00000 0" ONLOAD="fly()">

<SCRIPT LANGUAGE="JavaS cript">
<!-- Begin
SmallStars = 27;
LargeStars = 3;
SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
ns=(document.la yers)?1:0;
if (ns) {
for (i = 0; i < SmallStars; i++) {
document.write( "<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#EEDBD B'
CLIP='0,0,1,1'> </LAYER>");
}
for (i = 0; i < LargeStars; i++) {
document.write( "<LAYER NAME='ln"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF 0'
CLIP='0,0,2,2'> </LAYER>");
}
}
else {
document.write( '<div style="position :absolute;top:0 px;left:0px">') ;
document.write( '<div style="position :relative">');
for (i = 0; i < SmallStars; i++) {
document.write( '<div id="si"
style="position :absolute;top:0 ;left:0;width:1 px;height:1px;b ackground:#ffff f0;font-size:1px"></div>'); }
document.write( '</div>');
document.write( '</div>');
document.write( '<div style="position :absolute;top:0 px;left:0px">') ;
document.write( '<div style="position :relative">');
for (i = 0; i < LargeStars; i++) {
document.write( '<div id="li"
style="position :absolute;top:0 ;left:0;width:2 px;height:2px;b ackground:#ffff ff;font-size:2px"></div>'); }
document.write( '</div>');
document.write( '</div>');
}
WinHeight =
(document.layer s)?window.inner Height:window.d ocument.body.cl ientHeight; WinWidth =
(document.layer s)?window.inner Width:window.do cument.body.cli entWidth;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math .random() * WinHeight);
SmallXpos[i] = Math.round(Math .random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math .random() * WinHeight);
LargeXpos[i] = Math.round(Math .random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}
function fly() {
var WinHeight =
(document.layer s)?window.inner Height:window.d ocument.body.cl ientHeight; var WinWidth =
(document.layer s)?window.inner Width:window.do cument.body.cli entWidth;
var hscrll =
(document.layer s)?window.pageY Offset:document .body.scrollTop ;
var wscrll =
(document.layer s)?window.pageX Offset:document .body.scrollLef t;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math .random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
if (ns) {
document.layers['ln'+i].left = LargeXpos[i];
document.layers['ln'+i].top = LargeYpos[i] + hscrll;
}
else {
li[i].style.pixelLef t = LargeXpos[i];
li[i].style.pixelTop = LargeYpos[i] + hscrll;
}
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math .random()*WinHe ight);
Smallspeed[i] = Math.random() * 5 + 1;
}
if (ns) {
document.layers['sn'+i].left = SmallXpos[i];
document.layers['sn'+i].top = SmallYpos[i]+hscrll;
}
else {
si[i].style.pixelLef t = SmallXpos[i];
si[i].style.pixelTop = SmallYpos[i]+hscrll;
}
}
setTimeout('fly ()', 10);
}
// End -->
</SCRIPT>


Jul 23 '05 #4
Lee
Robert said:

In article <41************ ***@steppe.mn>, Cat <ca*@steppe.m n> wrote:
Greetings,

I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).


This script contains the Netscape 4.x layer tag. This tag was dropped
from the Gekco base browsers. Netscape 6.x, firefox, etc. This is the
reason for the failure.


Since there is no document.layers object, it doesn't detect modern
Netscape as being Netscape at all, and so it never writes the LAYER
tags. It writes the IE code, instead.

However, even the IE code is garbage. It creates multiple <div>
tags with the same ID and then refers to them as elements of a
global array by the name of that ID tag.

It's pretty sad that IE tolerates this garbage.

You would be better off find new code. This sort of thing should be
available.

Jul 23 '05 #5
Lee wrote:
Robert said:

In article <41************ ***@steppe.mn>, Cat <ca*@steppe.m n> wrote:
Greetings,

I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).


This script contains the Netscape 4.x layer tag. This tag was droppedfrom the Gekco base browsers. Netscape 6.x, firefox, etc. This is thereason for the failure.


Since there is no document.layers object, it doesn't detect modern
Netscape as being Netscape at all, and so it never writes the LAYER
tags. It writes the IE code, instead.

However, even the IE code is garbage. It creates multiple <div>
tags with the same ID and then refers to them as elements of a
global array by the name of that ID tag.

It's pretty sad that IE tolerates this garbage.

You would be better off find new code. This sort of thing should be
available.


Lee pretty much covered it ('garbage')...i n addition, the script is
written in such a way as to optimize differences in animation
efficiencies between (some) browsers, making any sort of uniform
timebase a kludge at best. style.pixelLeft/Top are IE-only. In any
event...dumped the LAYERS, cleaned it up a bit. Whatever.

<html>
<head>
<title>untitled </title>
</head>
<body bgcolor="#00000 0"
onresize="windo w.location.relo ad()"
onload="setInte rval('fly()', window.createPo pup?80:1);"><!-- a little
speed equalization -->
<script type="text/javascript">

var SmallStars = 27;
var LargeStars = 3;
var SmallYpos = [];
var SmallXpos = [];
var LargeYpos = [];
var LargeXpos = [];
var Smallspeed = [];
var Largespeed = [];
document.write(
'<div style="position :absolute;top:0 px;left:0px;">' ,
'<div style="position :relative;">'
);
for (i = 0; i < SmallStars; i++) {
document.write(
'<div id="si' + i + '" ',
'style="positio n:absolute;top: 0;left:0;',
'width:1px;heig ht:1px;backgrou nd:#fff;',
'font-size:1px;"></div>'
);
}
document.write(
'</div>','</div>',
'<div style="position :absolute;top:0 ;left:0;">',
'<div style="position :relative;">'
);
for (i = 0; i < LargeStars; i++) {
document.write(
'<div id="li' + i + '" ',
'style="positio n:absolute;top: 0;left:0;',
'width:2px;heig ht:2px;backgrou nd:#fff;',
'font-size:2px;"></div>'
);
}
document.write( '</div>','</div>');
WinHeight = ('undefined' != typeof window.innerHei ght)?
window.innerHei ght : document.body.c lientHeight;
WinWidth = ('undefined' != typeof window.innerWid th)?
window.innerWid th-5 : document.body.c lientWidth-5;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math .random() * WinHeight);
SmallXpos[i] = Math.round(Math .random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math .random() * WinHeight);
LargeXpos[i] = Math.round(Math .random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}

function fly() {
var hscrll = ('undefined' != typeof window.pageYOff set)?
window.pageYOff set : document.body.s crollTop;
var wscrll = ('undefined' != typeof window.pageXOff set)?
window.pageXOff set : document.body.s crollLeft;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math .random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
}
i = 0;
while (li = document.getEle mentById('li' + i)) {
li.style.left = LargeXpos[i] + 'px';
li.style.top = LargeYpos[i++] + hscrll + 'px';
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math .random()*WinHe ight);
Smallspeed[i] = Math.random() * 5 + 1;
}
}
i = 0;
while (si = document.getEle mentById('si' + i)) {
si.style.left = SmallXpos[i] + 'px';
si.style.top = SmallYpos[i++] + hscrll + 'px';
}
}

</script>
</body>
</html>

Jul 23 '05 #6
Richard wrote:
On Fri, 21 Jan 2005 15:36:03 +0100 Cat wrote:

Greetings,


I have an old javascript effect that was running on some of my
sites for quite long, working fine in Netscape (up to 4.75) and
IE. It still works in the newer IEs, but not in the new Mozillas,
neither Firebird nor Firefox (and not in Netscape 7.something).

Maybe due to the ancient ways of doing things.

document.write( '</div>');
document.write( '</div>');
document.write( '<div style="position :absolute;top:0 px;left:0px">') ;
document.write( '<div style="position :relative">');
Convert all of this stuff into css.
<div> should come before </div> not as you show it.


To the OP: Ignore the above advice. If Richard had bothered to *read*
the code, he would have noticed that it does indeed have them in the
correct order. It's typical of his hairbrained replies.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #7

(snip)

OK, cleaned this up a bit. Beware of lunatic line breaking courtesy of
googlegroups (turn on error reporting and look for unterminated
strings).

<html>
<head>
<title>untitled </title>
</head>
<body style="backgrou nd:#000;"
onresize="windo w.location.relo ad()"
onload="if(docu ment.getElement ById)setInterva l('fly()', 40)">
<script type="text/javascript">

var SmallStars = 27;
var LargeStars = 3;
var SmallYpos = [];
var SmallXpos = [];
var LargeYpos = [];
var LargeXpos = [];
var Smallspeed = [];
var Largespeed = [];
document.write(
'<div style="position :absolute;top:0 px;left:0px;">' ,
'<div style="position :relative;">'
);
for (i = 0; i < SmallStars; i++) {
document.write(
'<div id="si' + i + '" ',
'style="positio n:absolute;top: 0;left:0;',
'width:1px;heig ht:1px;backgrou nd:#fff;',
'font-size:1px;"></div>'
);
}
document.write(
'</div>','</div>',
'<div style="position :absolute;top:0 ;left:0;">',
'<div style="position :relative;">'
);
for (i = 0; i < LargeStars; i++) {
document.write(
'<div id="li' + i + '" ',
'style="positio n:absolute;top: 0;left:0;',
'width:2px;heig ht:2px;backgrou nd:#fff;',
'font-size:2px;"></div>'
);
}
document.write( '</div>','</div>');
WinHeight = ('undefined' != typeof window.innerHei ght)?
window.innerHei ght : document.body.c lientHeight;
WinWidth = ('undefined' != typeof window.innerWid th)?
window.innerWid th-5 : document.body.c lientWidth-5;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math .random() * WinHeight);
SmallXpos[i] = Math.round(Math .random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math .random() * WinHeight);
LargeXpos[i] = Math.round(Math .random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}

function fly() {
var hscrll = ('undefined' != typeof window.pageYOff set)?
window.pageYOff set : document.body.s crollTop;
var wscrll = ('undefined' != typeof window.pageXOff set)?
window.pageXOff set : document.body.s crollLeft;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math .random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
}
i = 0;
while (li = document.getEle mentById('li' + i)) {
li.style.left = LargeXpos[i] + 'px';
li.style.top = LargeYpos[i++] + hscrll + 'px';
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math .random()*WinHe ight);
Smallspeed[i] = Math.random() * 5 + 1;
}
}
i = 0;
while (si = document.getEle mentById('si' + i)) {
si.style.left = SmallXpos[i] + 'px';
si.style.top = SmallYpos[i++] + hscrll + 'px';
}
}

</script>
</body>
</html>

Jul 23 '05 #8
Cat
Hi,

thank you so very much for this, it works like a charm now.
I read the newsgroups in my old Netscape 4.8 still, so I don't
have problems with the linebreaks.

I will go through it and see where you made changes, hopefully
I learn something from it. For some reason, Javascript, like
cgi, comes terribly hard to me, even though I love to use it.
Maybe because it has something to do with logic, that's just not
my world (I'm a former painter that started out as a designer,
still longing for the brushes..;)

Thanks again,

Cat

RobB wrote:

(snip)

OK, cleaned this up a bit. Beware of lunatic line breaking courtesy of
googlegroups (turn on error reporting and look for unterminated
strings).

<html>
<head>
<title>untitled </title>
</head>
<body style="backgrou nd:#000;"
onresize="windo w.location.relo ad()"
onload="if(docu ment.getElement ById)setInterva l('fly()', 40)">
<script type="text/javascript">

var SmallStars = 27;
var LargeStars = 3;
var SmallYpos = [];
var SmallXpos = [];
var LargeYpos = [];
var LargeXpos = [];
var Smallspeed = [];
var Largespeed = [];
document.write(
'<div style="position :absolute;top:0 px;left:0px;">' ,
'<div style="position :relative;">'
);
for (i = 0; i < SmallStars; i++) {
document.write(
'<div id="si' + i + '" ',
'style="positio n:absolute;top: 0;left:0;',
'width:1px;heig ht:1px;backgrou nd:#fff;',
'font-size:1px;"></div>'
);
}
document.write(
'</div>','</div>',
'<div style="position :absolute;top:0 ;left:0;">',
'<div style="position :relative;">'
);
for (i = 0; i < LargeStars; i++) {
document.write(
'<div id="li' + i + '" ',
'style="positio n:absolute;top: 0;left:0;',
'width:2px;heig ht:2px;backgrou nd:#fff;',
'font-size:2px;"></div>'
);
}
document.write( '</div>','</div>');
WinHeight = ('undefined' != typeof window.innerHei ght)?
window.innerHei ght : document.body.c lientHeight;
WinWidth = ('undefined' != typeof window.innerWid th)?
window.innerWid th-5 : document.body.c lientWidth-5;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math .random() * WinHeight);
SmallXpos[i] = Math.round(Math .random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math .random() * WinHeight);
LargeXpos[i] = Math.round(Math .random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}

function fly() {
var hscrll = ('undefined' != typeof window.pageYOff set)?
window.pageYOff set : document.body.s crollTop;
var wscrll = ('undefined' != typeof window.pageXOff set)?
window.pageXOff set : document.body.s crollLeft;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math .random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
}
i = 0;
while (li = document.getEle mentById('li' + i)) {
li.style.left = LargeXpos[i] + 'px';
li.style.top = LargeYpos[i++] + hscrll + 'px';
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math .random()*WinHe ight);
Smallspeed[i] = Math.random() * 5 + 1;
}
}
i = 0;
while (si = document.getEle mentById('si' + i)) {
si.style.left = SmallXpos[i] + 'px';
si.style.top = SmallYpos[i++] + hscrll + 'px';
}
}

</script>
</body>
</html>

Jul 23 '05 #9

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

Similar topics

2
1261
by: Dennis M. Marks | last post by:
I made major changes to my scripts in http://www.dcs-chico.com/~denmarks/amtrak.html It works fine in IE but nothing happens when a selection is made in Mac Netscape 6. Is this problem just with this specific browser? Does it work with yours? Make a selection from each of the 3 menus on the left and see if corresponding data appears on the...
15
1568
by: AV | last post by:
Hallo any idea why the following code doesn't work? ////////////////////////////////// function myfunc(){ with(this){ prop="hallo world"; } }
1
5919
by: Mike | last post by:
Sorry if this isn't exactly the right NG for this, but I thought you guys would know better than anyone else. I have 2 computers networked. The internet connection is dial-up, and I'm using ezProxy to share the connection. Both computers are Win98, and both have IE6.0. The main PC works perfectly, but the second PC's browser doesn't...
7
42557
by: Bennett Haselton | last post by:
Is there any way to find a string representing an object's class, which will work in Internet Explorer 6? "typeof" doesn't work -- it returns "object" for all objects: x = window.open('http://www.yahoo.com/'); alert(typeof x); And I found this page: http://www.mozilla.org/js/language/js20-2002-04/core/expressions.html
6
3555
by: Cliff R. | last post by:
Hi, I use a handy little Javascript Flash detection script on a number of sites (copied below). Usually works great, but I just started trying Firefox and it's not working. A few browsers are referenced in the script so I presume that Firefox needs to be added somewhere -- does anyone know how I could update this to be supported by Firefox?...
3
1565
by: Bahman | last post by:
Hello! I have a .net form in an IE6 browser. I have a javascript validate function that returns false if user hits cancel. From testing, I can see when I click submit and cancel, the javascript is returning the false code to the button correctly. However, the asp page continues with execution and the code runs (which was not supposed...
13
1438
by: Olaf \El Blanco\ | last post by:
#include <stdio.h> // If char *frase="Andrew" I want *frase="werdnA" with THIS for... int main() { int start, finish; char aux; char *phrase="Andrew... is listening to Dimmu Borgir..."; finish=strlen(phrase)-1;
7
3667
by: CharlesA | last post by:
Hi folks, first off, I'm using .Net framework 1.1 with ASP.net and C# I'm trying to do something very simple...but I can't figure it out I have an <asp:button runat="server"> in the test version of my app that is essentially a backdoor for changing the class of user inside the application on the fly....it has a textbox next to it you...
2
1981
by: The87Boy | last post by:
Hey I have a problem with a Javascript, which doesn't works in Firefox You can have a mouse over the 2 first pictures, but after the second picture has moved over the screen, nothing is happening when you move the mouse over the slideshow The source code is here: http://the87boy.dk/Slideshow.html What could be wrong?
0
7920
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...
1
7973
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...
1
5718
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...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
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...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2358
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
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.