[Web4lib] Valid substitute for body onLoad()

John Loy jml4n at virginia.edu
Mon Oct 30 15:33:00 EST 2006


Bob,

I recommend using the Suckerfish css dropdowns technique.

http://www.htmldog.com/articles/suckerfish/dropdowns/

And use an unobtrusive method of attaching functions to the onLoad  
event.

http://onlinetools.org/articles/unobtrusivejavascript/chapter4.html
http://www.dustindiaz.com/rock-solid-addevent/
http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html
http://dean.edwards.name/weblog/2005/10/add-event/

--
John Loy
Web Designer and Information Architect
University of Virginia Library
phone: (434) 924-7099
fax: (434) 924-1431
552 Alderman Library
http://lib.virginia.edu


On Oct 30, 2006, at 3:18 PM, Robert Sullivan wrote:

> I have found an almost-pure CSS method method for drop down menus
> which works across browsers and validates, except that it uses a small
> piece of Javascript which is called by <body onLoad>.
>
> That won't pass the validator and since I don't speak Javascript I am
> looking for an alternative means of doing that.  The site I saw this
> on:
>
> <http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm>
>
> says you may replace that with a window.onload in the script file, but
> before I get in any deeper I am asking people who actually know what
> they're doing. :-)
>
> -- 
> Bob Sullivan
> Schenectady Digital History Archive
> <http://www.schenectadyhistory.org/>
> Schenectady County (NY) Public Library



More information about the Web4lib mailing list