Re: how to speed up this with Netscape
- From: "Stephen Chalmers" <ignoring@xxxxxxxxxxx>
- Date: 26 Aug 2005 14:02:03 -0700
Chris wrote:
> Hi,
>
> I made a kind of banner in javascript which goes slowly to the left and
> comes back from the right.
> This works good with IExplorer but is too slow with Netscape 7.1
> Anybody an idea why and how to make it faster?
> Thanks.
> Here the code:
>
> <body OnLoad="aze()">
> <script language=javascript>
> var delay=25;
> var a;
> ft1=document.getElementById("fot1").style //fot1 = id of object that
> moves
>
> function aze()
> {
> x1=x1-1
>
> if (x1==-64)
> {x1=882}
>
> ft1.left=x1
>
> a=setTimeout("aze()", delay);
> }
>
> document.getElementById("f1").onmouseover=fo1
> </script>
>x1=x1-1
That's better written as x-=1; or x--;
The solution would require a rewite of the relevant module of the
browser. It's predecessor was faster than I.E.
Any delay < 200 ms is optimistic on Gecko browsers.
You could increase the step size: x-=2;
--
.
- Prev by Date: Re: Navigate table rows using arrow keys
- Next by Date: change value of a Number object
- Previous by thread: Copying a table's properties and styles
- Next by thread: change value of a Number object
- Index(es):
Relevant Pages
|