On 29 Oct 2008, at 14:40, Christopher wrote:
>
> Hi everybody,
>
> I''m a rails beginner and I''m trying to figure out how to
react to a
> keyboard press in an rjs-file and then do some stuff to the page. It
> should go something like this:
>
> if @correct
> #do something
> #wait for the user to press any key
> #do something
> end
> end
>
> Does anybody know how to do this?
That''s not really how event handling is done in javascript. you would
normally attach an event handler to some page object rather than sit
and wait for an event to happen.
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---