There are two reasons we changed over to using window.attachEvent.  Firstly, its
is a IE only method so in effect it does its own branching for IE and secondly,
you can add multiple events on the same handler which means you could lump
several functions onto the onload handler rather than just the one.  So in
short, it's a little bit neater but its nothing you can't get around.  If you
need to run other functions on window.onload just do sommat like this:

window.onload = function() {
    sfHover();
    otherThing();
    anotherThing();
}

When I get a chance I'll put a note about this on the article as a fair amount
of people have brought it up and the answer is buried in the article comments.

Cheers,

Dan

Quoting Kay Smoljak <[EMAIL PROTECTED]>:

> awesome - thanks so much! Does that change have any negative side-effects?
> 
> On Mon, 28 Jun 2004 09:27:32 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > 
> > You can make the suckerfish dropdowns work on IE5 Mac by using
> window.onload to
> > trigger the suckerfish function rather than window.attachEvent
> > 
> > So you can use
> > 
> > if (document.all && document.getElementById) window.onload = sfHover;
> > 
> > instead of
> > 
> > if (window.attachEvent) window.attachEvent("onload", sfHover);
> > 
> > That should get it to work.  We found this out very shortly after we
> published
> > the articles.  Sorry about that, we don't have much access to Macs to
> test.
> > 
> > Cheers,
> > 
> > Dan
> > 
> > 
> > Quoting Kay Smoljak <[EMAIL PROTECTED]>:
> > 
> > > Hi,
> > >
> > > We've got a client who uses Macs exclusively. Our fave dropdown menu
> > > of the moment, Son of Suckersfish, does not work in IE5 Mac.
> > >
> > > The client is also maintaining the site using Contribute, and our
> > > old-school brute force JavaScript dropdowns (CoolMenus) don't play
> > > nicely with Contribute.
> > >
> > > The original Suckerfish menus *do* work in IE5 Mac, but we need to
> > > have a solution where the top level stays highlighted while the
> > > submenus are being rolled over. We can do this with ugly old-school
> > > JavaScript mouseovers, but it's an ugly bloated solution and I'd
> > > really prefer something a bit cleaner.
> > >
> > > Anyone have any other ideas?
> *****************************************************
> The discussion list for http://webstandardsgroup.org/
> See http://webstandardsgroup.org/mail/guidelines.cfm
> for some hints on posting to the list & getting help
> ***************************************************** 
> 
> 



*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
***************************************************** 

Reply via email to