[Javascript] Re: Re: Re: Is this right Javascript?
Peter-Paul Koch
gassinaumasis at hotmail.com
Wed Apr 9 14:49:01 CDT 2003
>This is just a code snippet I saw on a bigger script,
>I wasn´t trying to understand what it does.
>
>I just thought it was weird to have a function called
>window.document.formulario.richtext.onkeydown();
>
>I´m not a big expert on programming but I´ve never
>seen a function with an event name.
Actually this is a correct JavaScript function. It commands the keydown
event handler of the richtext element of the formulario form of the docuemnt
to be executed. It does assume that such an event handler is defined.
In my last project I actually called onclick event handlers of radio buttons
in such a way, but generally you'll hardly use it.
(that *supposebly*
>does the same as having a function called by an
>onkeydown event on a form element - and that is *my*
>supposition! I just wanted to know if it was right)
Yep, completely correct.
--------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
--------------------------------------------------
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the Javascript
mailing list