<form action="/js" method="post"> <input id="text_i" onchange="alert(''hai'');" size="30" type="text"/> <input name="commit" type="submit" value="Click Me!" /> </form> i am using firefox 2.0.0.6 the above html will open a a text box and button step 1: enter into box ''aaa'' & press button ''Click Me'' step 2: enter into box ''aab'' & press button ''Click Me'' step 3: now if you enter ''a'' into box then autocomplete drop down will open so you can select from that(which r given previously) but alert is not working -- 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 3 Apr 2008, at 15:43, Pokkai Dokkai wrote:> > <form action="/js" method="post"> > <input id="text_i" onchange="alert(''hai'');" size="30" type="text"/> > <input name="commit" type="submit" value="Click Me!" /> > </form> > > i am using firefox 2.0.0.6 > the above html will open a a text box and button > > step 1: enter into box ''aaa'' & press button ''Click Me'' > step 2: enter into box ''aab'' & press button ''Click Me'' > step 3: now if you enter ''a'' into box then autocomplete drop down will > open > so you can select from that(which r given previously) >If I remember correctly onChange on a text input only fires where the field loses focus. Fred> but alert is not working > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> If I remember correctly onChange on a text input only fires where the > field loses focus. > > Fredyes ,but why onchange is not triggered when the field loss focus at autocomcomplete only ? -- 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 -~----------~----~----~----~------~----~------~--~---
actually that the onchange is not triggered when i select something in the browsers autocomplete list? -- 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 -~----------~----~----~----~------~----~------~--~---