I use render in a view page like this: <% form_for :project do |form| %> <table> <tr> <td> <% select_tag:project_selection,options_for_select(@project_names) %> <% observe_field :project_selection, :frequency => 0.5, :update => ''project_version_ajax'', :url => {:action => ''update_project_selection''} %> </td> </tr> <div id=''project_version_ajax''> <%= render :partial=>''project_version'' %> </div> </table> <% end %> In update_project_selection controller: def update_project_selection ... render :partial=>''project_version'' end when the select box changed its value, the controller is invoked but the _project_version.html.erb doesn''t update. -- 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 6 Jan 2009, at 14:07, Zhao Yi wrote:> > I use render in a view page like this: > > <% form_for :project do |form| %> > <table> > <tr> > <td> > <%> select_tag:project_selection,options_for_select(@project_names) > %> > <%> observe_field :project_selection, > :frequency => 0.5, > :update => ''project_version_ajax'', > :url => {:action => ''update_project_selection''} %> > </td> > </tr> > <div id=''project_version_ajax''> > <%= render :partial=>''project_version'' %> > </div> > </table>I don''t believe it''s legal HTML to have a div there. Fred>--~--~---------~--~----~------------~-------~--~----~ 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:> > I don''t believe it''s legal HTML to have a div there. > > FredWhy? Could you tell me what wrong with my code? -- 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 6 Jan 2009, at 14:53, Zhao Yi wrote:> > Frederick Cheung wrote: >> >> I don''t believe it''s legal HTML to have a div there. >> >> Fred > > Why? Could you tell me what wrong with my code? >That''s just the way it is, divs aren''t allowed there (just as you can''t do <span><div></div></span> either). Try putting your html through the w3c validator Fred> -- > 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:> That''s just the way it is, divs aren''t allowed there (just as you > can''t do <span><div></div></span> either). Try putting your html > through the w3c validator > > FredA render must be in an element. If I can''t use div in this case, how can I render it? -- 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 -~----------~----~----~----~------~----~------~--~---
Quoting Zhao Yi <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Frederick Cheung wrote: > > That''s just the way it is, divs aren''t allowed there (just as you > > can''t do <span><div></div></span> either). Try putting your html > > through the w3c validator > > > > Fred > A render must be in an element. If I can''t use div in this case, how can > I render it?Your element (the <div>...</div>) isn''t in a valid place. You have it between a row and the end of the table. Is it supposed to straddle the table boundary? Either move it into the <td>...</td> or outside the table as appropriate. Or put it in a table row of its own. Jeffrey --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---