I am very new to ruby and since my javscript skills are zero I was wondering if this could be done. I have a drop down. When the user makes a selection I would like to make a call with observe_field. Can I then check to see if the selection the user made from the drop down menu is in a another array that keep track of what the user has selected. In the array that is checked against will simply add 1 next to the item if it is not in the list. That is the user is selecting it for the first time. My English is not very good so I hope this makes sense. Can someone give me some guidance on this. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
yeah you can get the value of what the select is set at and add it to a javascript variable or what not. Google for select javascript. On Wed, Apr 30, 2008 at 8:45 PM, rushnosh <rashantha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am very new to ruby and since my javscript skills are zero I was > wondering if this could be done. > > I have a drop down. When the user makes a selection I would like to > make a call with observe_field. > > Can I then check to see if the selection the user made from the drop > down menu is in a another array that keep track of what the user has > selected. > > In the array that is checked against will simply add 1 next to the > item if it is not in the list. That is the user is selecting it for > the first time. > > My English is not very good so I hope this makes sense. > > Can someone give me some guidance on this. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
So I used <%= observe_field :id_of_select, url => {action => "add"}, :frequency => 0.25 %> this is below the select tag when I choose and item from the drop down it does absolutely nothing. I examined it in firebug and I don''t see anything either. View of the source shows that it has selected the proper id of the drop down. On Apr 30, 8:30 pm, "Roger Pack" <rogerpack2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> yeah you can get the value of what the select is set at and add it to > a javascript variable or what not. Google for select javascript. > > On Wed, Apr 30, 2008 at 8:45 PM, rushnosh <rashan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I am very new to ruby and since my javscript skills are zero I was > > wondering if this could be done. > > > I have a drop down. When the user makes a selection I would like to > > make a call with observe_field. > > > Can I then check to see if the selection the user made from the drop > > down menu is in a another array that keep track of what the user has > > selected. > > > In the array that is checked against will simply add 1 next to the > > item if it is not in the list. That is the user is selecting it for > > the first time. > > > My English is not very good so I hope this makes sense. > > > Can someone give me some guidance on this.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I got something to happen in firebug, but it is calling function 3 or 4 times while the user goes down the drop down menu. Also I can not get it do anything with .js file no out come , tried a simple page.insert. Is observe_field the correct method? I have map.connect '':controller/:action/:id.:format'' below it I have a catch all map.connect ''*path'', :controller => ''user'', :action => ''login'' On Apr 30, 10:29 pm, rushnosh <rashan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So I used <%= observe_field :id_of_select, url => {action => > "add"}, :frequency => 0.25 %> > > this is below the select tag when I choose and item from the drop down > it does absolutely nothing. > I examined it in firebug and I don''t see anything either. > > View of the source shows that it has selected the proper id of the > drop down. > > On Apr 30, 8:30 pm, "Roger Pack" <rogerpack2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > yeah you can get the value of what the select is set at and add it to > > a javascript variable or what not. Google for select javascript. > > > On Wed, Apr 30, 2008 at 8:45 PM, rushnosh <rashan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I am very new to ruby and since my javscript skills are zero I was > > > wondering if this could be done. > > > > I have a drop down. When the user makes a selection I would like to > > > make a call with observe_field. > > > > Can I then check to see if the selection the user made from the drop > > > down menu is in a another array that keep track of what the user has > > > selected. > > > > In the array that is checked against will simply add 1 next to the > > > item if it is not in the list. That is the user is selecting it for > > > the first time. > > > > My English is not very good so I hope this makes sense. > > > > Can someone give me some guidance on this.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m not sure how to do rjs with observe_field. On Thu, May 1, 2008 at 12:26 AM, rushnosh <rashantha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I got something to happen in firebug, but it is calling function 3 or > 4 times while the user goes down the drop down menu. > Also I can not get it do anything with .js file no out come , tried a > simple page.insert. > > Is observe_field the correct method? > > I have map.connect '':controller/:action/:id.:format'' > below it I have a catch all map.connect ''*path'', :controller => > ''user'', :action => ''login'' > > > > On Apr 30, 10:29 pm, rushnosh <rashan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > So I used <%= observe_field :id_of_select, url => {action => > > "add"}, :frequency => 0.25 %> > > > > this is below the select tag when I choose and item from the drop down > > it does absolutely nothing. > > I examined it in firebug and I don''t see anything either. > > > > View of the source shows that it has selected the proper id of the > > drop down. > > > > On Apr 30, 8:30 pm, "Roger Pack" <rogerpack2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > yeah you can get the value of what the select is set at and add it to > > > a javascript variable or what not. Google for select javascript. > > > > > On Wed, Apr 30, 2008 at 8:45 PM, rushnosh <rashan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > I am very new to ruby and since my javscript skills are zero I was > > > > wondering if this could be done. > > > > > > I have a drop down. When the user makes a selection I would like to > > > > make a call with observe_field. > > > > > > Can I then check to see if the selection the user made from the drop > > > > down menu is in a another array that keep track of what the user has > > > > selected. > > > > > > In the array that is checked against will simply add 1 next to the > > > > item if it is not in the list. That is the user is selecting it for > > > > the first time. > > > > > > My English is not very good so I hope this makes sense. > > > > > > Can someone give me some guidance on this. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---