[thelist] DOM in Mozilla

Nickolay Kolev nmkolev at uni-bonn.de
Thu Oct 31 07:58:01 CST 2002

>I just tested this myself in Mozilla 1.2b and IE6 SP1 running on
>Windows XP Pro. It didn't work in either one.... The problem is
>that, as written, you're assigning the nodes to the variables
>before the page has rendered completely. Wrap the script that you
>have in a function declaration and call it onload - that fixed it
>for me in both browsers.
>Seems to be a common pitfall. ;)

Can I assign a function to an onload event without adding he event
to the body tag? This little search box is included i quite a few
pages and I would not like to have the event hardcoded into each


More information about the thelist mailing list