the e is the argument name on the function and what the event object becomes
known as within the scope of the function. it can be anything, but most of
us use 'e' as it's short and then you can copy/paste code easily.
if you prefer you can call it evt or something..
prototype passes the event object as that argument to the function, like
this:
definition:
function dosomething(somearg)
{
alert(somearg)
}
call:
dosomething('hi');
function arguments in scope:
somearg => "hi"
output:
alert box of "hi"
if you take this example and treat somearg as e and "hi" as an event
object.. the same applies
On Feb 11, 2008 1:52 PM, anathema <[EMAIL PROTECTED]> wrote:
>
> Sorry, I don't get it. Does it have to be an 'e', or did he just
> choose that letter randomly? Maybe a complete example would help.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---