I am using 2 dropdown selections DDA and DDB in a form I use a Ajax observe_field on DDA to change DDB , working fine.... <%= observe_field (''DDA'', :url => {:action => ''DDA_selected''}, :with => "''id=''+value") -%> --in controller def DDA_selected render :update do |page| page.replace_html ''DDBBox'', :partial => ''DDBbox'' end end I tried to use another observe_field on DDB to show a div, but nothing happen when selecting an option in DDB <%= observe_field (''DDB'', :url => {:action => ''DDB_selected''}, :with => "''id=''+value") -%> --in controller def DDB_selected render :update do |page| page.show ''part2form'' end end -- 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 -~----------~----~----~----~------~----~------~--~---
On Oct 8, 8:14 am, Kad Kerforn <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am using 2 dropdown selections DDA and DDB in a form > > I use a Ajax observe_field on DDA to change DDB , working fine.... > > <%= observe_field (''DDA'', > :url => {:action => ''DDA_selected''}, > :with => "''id=''+value") -%> > > --in controller > def DDA_selected > render :update do |page| > page.replace_html ''DDBBox'', :partial => ''DDBbox'' > end > end > > I tried to use another observe_field on DDB to show a div, but nothing > happen when selecting an option in DDB > > <%= observe_field (''DDB'', > :url => {:action => ''DDB_selected''}, > :with => "''id=''+value") -%> > > --in controller > def DDB_selected > render :update do |page| > page.show ''part2form'' > end > end > > -- > Posted viahttp://www.ruby-forum.com/.Does DDB exist at the time the observer is created? _Kevin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
_Kevin wrote:> On Oct 8, 8:14 am, Kad Kerforn <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> render :update do |page| >> >> --in controller >> def DDB_selected >> render :update do |page| >> page.show ''part2form'' >> end >> end >> >> -- >> Posted viahttp://www.ruby-forum.com/. > > Does DDB exist at the time the observer is created? > > _KevinYou gave me a clue .... thanks a lot !!!! when page.replace_html ''DDBBox'', :partial => ''DDBbox'' is performed... I forgot to write ALSO in the DDBbox partial the observe_field.... -- 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 -~----------~----~----~----~------~----~------~--~---