Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18226

Re: IE8 attachEvent problem

Newsgroups comp.lang.javascript
Date 2013-01-23 13:49 -0800
References <am2ojqFk54hU1@mid.individual.net>
Message-ID <a79f8df0-c782-405e-99fe-608634de5f5d@googlegroups.com> (permalink)
Subject Re: IE8 attachEvent problem
From Arty Effem <ignoring@mail.com>

Show all headers | View raw


On Sunday, 20 January 2013 17:42:14 UTC, Mel Smith  wrote:
> Hi:
> 
> 
> 
> Environment: As a client using an IE8 browser on a Win XP Pro (sp2) machine:
> 
> 
> 
>     Within  the javascript code in my page there is a 'function remember()'. 
> 
> It is shown as --- the problem function --- below. The function 'remembers' 
> 
> where in a long table my user was viewing, so that when he 'returns' to the 
> 
> page, I position his viewport to the 'remembered' set of lines. It has 
> 
> worked fine for a long time but under IE7. 

That function has never worked, it just looked as though it did.

attachEvent/addeventLister expect a function reference and that's not what you're passing them. You are executing scrollIntoView immediately, without waiting for load.

window.addEventListener("load", function(){ document.getElementById(tid).scrollIntoView(); } ,false);


etc. It would be better to define the function separately and just pass its name ( without () ) in the three places in the code.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-20 10:42 -0700
  Re: IE8 attachEvent problem Martin Honnen <mahotrash@yahoo.de> - 2013-01-20 18:55 +0100
    Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-20 10:59 -0700
      Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-20 11:24 -0700
        Re: IE8 attachEvent problem Martin Honnen <mahotrash@yahoo.de> - 2013-01-21 12:06 +0100
          Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-21 09:52 -0700
  Re: IE8 attachEvent problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-20 20:11 +0100
    Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-20 13:21 -0700
      Re: IE8 attachEvent problem Bjoern Hoehrmann <bjoern@hoehrmann.de> - 2013-01-20 21:44 +0100
        Re: IE8 attachEvent problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-21 00:07 +0100
        Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-20 16:19 -0700
          Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-20 17:18 -0700
    Re: IE8 attachEvent problem Martin Honnen <mahotrash@yahoo.de> - 2013-01-21 18:28 +0100
      Re: IE8 attachEvent problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-21 19:07 +0100
        Re: IE8 attachEvent problem Martin Honnen <mahotrash@yahoo.de> - 2013-01-21 19:33 +0100
        Re: IE8 attachEvent problem "Mel Smith" <med_cutout_syntel@aol.com> - 2013-01-21 13:05 -0700
          Re: IE8 attachEvent problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-22 09:00 +0100
  Re: IE8 attachEvent problem Arty Effem <ignoring@mail.com> - 2013-01-23 13:49 -0800

csiph-web