Hi I am trying to make text_area compiled to <form> <input type="text" onkeypress="return handleEnter(this, event)"><br> <input type="text" onkeypress="return handleEnter(this, event)"><br> <textarea>Some text</textarea> </form> but I am not sure how the syntax should be. THX -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 2/12/07, Bontina Chen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi > > I am trying to make text_area compiled to > > <form> > <input type="text" onkeypress="return handleEnter(this, event)"><br> > <input type="text" onkeypress="return handleEnter(this, event)"><br> > <textarea>Some text</textarea> > </form> > > but I am not sure how the syntax should be.Have you seen the observe_field helper in Rails? Look it up. You can give it a field id and a function, and it will bind them together to watch for input. You can also make it polling-based and give it a frequency option in seconds. There is a sister helper called observe_form. Chad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chad Fowler wrote:> Have you seen the observe_field helper in Rails? Look it up. You can > give it a field id and a function, and it will bind them together to > watch for input. You can also make it polling-based and give it a > frequency option in seconds.How would it trigger on, say, the <F8> key? -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---