[Javascript] Re: Re: Re: Is this right Javascript?

Sabrina Leandro saleandro at yahoo.com
Wed Apr 9 15:39:20 CDT 2003


Thanks Peter-Paul! It was very helpful.

Sabrina

Message: 3
Date: Wed, 09 Apr 2003 19:49:01 +0000
From: "Peter-Paul Koch" <gassinaumasis at hotmail.com>
Subject: Re: [Javascript] Re: Re: Re: Is this right
Javascript?
To: javascript at LaTech.edu
Message-ID: <F47rGvnCjnZS08i7M4B000079b6 at hotmail.com>
Content-Type: text/plain; format=flowed

>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.



__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


More information about the Javascript mailing list