Re: how to speed up this with Netscape



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;

--

.



Relevant Pages

  • Re: on page exit
    ... of which JavaScript is only one. ... used in HTML with intrinsic event handler attribute values, ... var clickedLink = null; ...
    (comp.lang.javascript)
  • Re: Highlighter
    ... JavaScript, but during this project, I have to admit, I am not the ... var where, ergebnis; ... Say you try to highlight 'color' and there is an element somewhere on the page that has a style attribute with a setting for the color or background-color property - I think you can see where this will go horribly wrong. ...
    (comp.lang.javascript)
  • Re: VBScript versus JavaScript
    ... gc holds a reference to the textbox. ... var gc = document.FORM1.txtGCPHNO.value ... > Is there any way I can get away from using JavaScript? ... If you are talking about using script in a browser then VBScript only works ...
    (microsoft.public.scripting.vbscript)
  • Re: Can Jscript source code be visible in a browser?
    ... > what we can do as web developers to hide JavaScript. ... var ContextWindow = window.open; ... So, I just typed the URL into my browser, and was prompted to run or save ... > Your analogy against my suggestion doesn't seem to be correct. ...
    (microsoft.public.dotnet.framework.aspnet)
  • dynamically building and evaluating expressions in javascript (functionally)
    ... I'm a relative newbie to javascript and functional programming, ... user of my webpage to be able to filter this list any way he wants. ... var mylist; //temp list which will contain my results ...
    (comp.lang.functional)