[thelist] javascript: passing events

Tom Dell'Aringa pixelmech at yahoo.com
Thu Feb 20 10:39:03 CST 2003


--- Hans Fraser <hfraser at videotron.ca> wrote:
> Hello EveryBody!
>
> here is the problem!
> the : <input type="checkbox"  /> elements do not support onLoad
> events

That's because the page is already loaded... You can't call onLoad
from a form element. Body or window calls onload.

> here is what checkRefElement(this, '4') does ... it checks if the
> element with the id 4 is in an array if so it turn the check box
> on!

If you want to do this at page load, set the function like so:

window.onload = init();

function init()
{
  checkRefElement();
  someOtherFunctionToo();
}

HTH

Tom



=====
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.pixelmech.com/
var me = tom.pixelmech.webDeveloper();

http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



More information about the thelist mailing list