[thelist] js problem
.jeff
jeff at members.evolt.org
Fri Sep 13 17:48:01 CDT 2002
tom,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Tom Dell'Aringa
>
> > what's your onload event handler look like?
>
> Right when you asked that question I figured it out -
> was using window.onload to set it - I don't think
> you can pass parameters that way. Moved it to the
> body tag and it worked :P Thanks!
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
that's correct. you can't pass parameters in a function call from an event handler in script. however, you can use an anonymous function.
onload = function()
{
defaultFocus(document.forms[0].elements['last_name']);
}
an advantage of this is that you can now call multiple functions from the onload, each with their own set of arguments.
enjoy,
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list