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


Groups > comp.lang.javascript > #18165

Re: IE8 attachEvent problem

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Mel Smith" <med_cutout_syntel@aol.com>
Newsgroups comp.lang.javascript
Subject Re: IE8 attachEvent problem
Date Sun, 20 Jan 2013 10:59:08 -0700
Lines 36
Message-ID <am2pjiFkcl1U1@mid.individual.net> (permalink)
References <am2ojqFk54hU1@mid.individual.net> <50fc2fac$0$6566$9b4e6d93@newsspool4.arcor-online.net>
X-Trace individual.net RBMPozjxVGoqNnC8dwiEnArThuWOo5xnnR6UVqjohSOk0C5xNXi2aqDhWTAwvVOSYq
Cancel-Lock sha1:Cg9QlECEZ9VS6o7WIbD0aN3/90Q=
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646 Format=Flowed; Response
Xref csiph.com comp.lang.javascript:18165

Show key headers only | View raw


Martin said:

>
> With both event APIs (MSHTML/IE as well as the W3C DOM) you need to pass 
> in a function object that you want to be called, not call a function. So 
> you need
>   window.addEventListener("load"
>     function() {
>       document.getElementById(tid).scrollIntoView();
>     },
>     false
>   );
> respectively
>   window.attachEvent("onload", function() { 
> document.getElementById(tid).scrollIntoView(); });
>
> On the other hand if your remember function is called onload then it 
> should suffice to simply call the scrollIntoView, as your current code 
> does anyway, only accidentally.
>
> So depending on when/where you execute the remember function, you might 
> not need to use addEventListener respectively attachEvent, you can simply 
> put your
>    document.getElementById(tid).scrollIntoView();
> in the remember function.
>

    Hi Martin:

    I'll print and study your response.

Thank you !

-Mel Smith

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next 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