Re: Center myLayer relative to scroll...



On Dec 23, 12:51 pm, AKS <aksus...@xxxxxxxxx> wrote:
On Dec 23, 10:30 pm, David Mark <dmark.cins...@xxxxxxxxx> wrote:

What a waste of time.  No mention of any magical parseInt spells.  The
author came up with some other incantation.
Mark "Tarquin" Wilton-Jones wrote:

  div#fixme {
    left: expression( document.body.scrollLeft + 'px' );
    top: expression( document.body.scrollTop + 'px' );
  }

  Due to a bug in Internet Explorer's interpretation of expressions,
it does  not update this, so it just stayed at 0,0.
... I assigned the value to a variable, then used that to assign it to
the expression inline, it did update in Internet Explorer 5.5 and 6.

So Mark "Tarquin" Wilton-Jones chanted about a variable assignment
that supposedly works around a bug in IE6 and under. He does not
indicate why he thinks his spell works or what bug it works around.
The examples also use CSS child selector hacks, which are clearly
uneeded.

After reading his "theory", I tested my posted version in IE7 and it
worked fine without introducing a variable (or using parseInt.)
Perhaps some workaround is needed for IE6 and under, but I wouldn't
take his word for it. You might want to try it in IE6 as it would be
more efficient than calling parseInt.


But I use parseInt instead of using a global variable (and it is
possible to use eval instead of parseInt). That's all.

You certainly don't want to use eval! These expressions are evaluated
every time you move the mouse. If I had to deal with this problem, I
would start by finding out more about the bug. Is there an MS KB
article on it? If so, what is the recommended workaround? Any
workaround that requires calling eval (or parseInt) every time the
mouse moves is unacceptable.

Luckily, I don't have to deal with this problem as I wouldn't use CSS
expressions to center an element.
.



Relevant Pages

  • Re: Center myLayer relative to scroll...
    ... Due to a bug in Internet Explorer's interpretation of expressions, ... it did update in Internet Explorer 5.5 and 6. ... But I use parseInt instead of using a global variable (and it is ...
    (comp.lang.javascript)
  • Re: 6 gfortran bugs
    ... elemental intrinsics (do they usually allow them in specification ... > Bug 1. ... One of my favorite sources of bugs: initialization expressions. ... a specification expression of any stripe! ...
    (comp.lang.fortran)
  • Re: Bug in HP-35S?
    ... Best regards. ... Some minor changes ... in the expressions still demonstrates the error, ... Is this a well-known bug somehow? ...
    (comp.sys.hp48)
  • Column Expression Bug in VS.NET 2003
    ... I could not get aggregate child column expressions to work when they ... were defined in a DataSet using the DataSet designer. ... Expressions that did not use relations seemed to work OK. ... This bug should be more widely documented. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Floating point run time error
    ... between immediate and run time in how the expressions are evaluated, ... the "bug" was elsewhere. ... Danny ... Remove NOSPAMFOR before emailing.) ...
    (microsoft.public.vb.syntax)

Loading