#view <%form_tag :action=>"some_action" do -%> <table> <tr> <td><%=text_field "user","name"-%></td> <td id="name_response"></td> <%=observe_field :user_name,:update=>"name_response",:url=> {:controller=>"login",:action=>"check_name"},:with=>"input_name",:on=>"blur"- %> </tr> </table> .... <%end-%> #view the check_name method just renders a partial to response the ajax. the observe_field works properly when it is used for select ,but not for text_filed.i can not see any event to be invoked and not be able to debug.i have searched the forum to get answer,but seems not to find it about it.thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, On Thu, 2009-03-05 at 18:49 -0800, daociyiyou wrote:> #view > <%form_tag :action=>"some_action" do -%> > <table> > <tr> > <td><%=text_field "user","name"-%></td> > <td id="name_response"></td> > <%=observe_field :user_name,:update=>"name_response",:url=>You''re using form_tag which means that the params hash is not bound to an object. Both your text_field syntax and your observe_field syntax assume otherwise. Make them match. Also, you''re headed for nothing but trouble trying to use Ajax on tables. Microsoft controls how tables work. And they don''t work well with Ajanx. HTH, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thanks. On 3月6日, 上午11时21分, bill walton <bwalton...@gmail.com> wrote:> Hi, > > On Thu, 2009-03-05 at 18:49 -0800, daociyiyou wrote: > > #view > > <%form_tag :action=>"some_action" do -%> > > <table> > > <tr> > > <td><%=text_field "user","name"-%></td> > > <td id="name_response"></td> > > <%=observe_field :user_name,:update=>"name_response",:url=> > > You''re using form_tag which means that the params hash is not bound to > an object. Both your text_field syntax and your observe_field syntax > assume otherwise. Make them match. Also, you''re headed for nothing but > trouble trying to use Ajax on tables. Microsoft controls how tables > work. And they don''t work well with Ajanx. > > HTH, > Bill--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, 2009-03-05 at 23:04 -0800, daociyiyou wrote:> thanks. >You''re welcome. Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---