Dear list, I must be going mad. My code: <p class="online_more_info" style="display: none"> <%=h user.phone %><br /> <%=h user.company %><br /> <% @message = Message.new %> #UGLY, someone has a solution? <% form_for([@project, @message]) do |f| %> <%= f.hidden_field(''recipient_id'', :value => user.id ) %> <%= f.text_area(''text'', :size =>"10x4") %><br /> <%= submit_tag(''Verstuur'') %> <% end %> </p> So the form is enclosed in a hidden p tag. This works like a charm in Opera, however in FF the form does show! ''show source'' shows the correct HTML but Firebug shows that the p tag closes _before_ the form. Really really weird. Does this sound familiar to someone? With kind regards, Harm PS @message can be empty as it is really simple, now fixed with an ugly hack. Any suggestions? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
mboeh-UtljGsy+VVc0aPf6s/0I7w@public.gmane.org
2007-Oct-26 16:41 UTC
Re: (remote_)for_form placement, most bizar error seen so far
The P element cannot contain block-level elements like FORM [1]. Firefox tends to be pretty strict about form elements, so I suspect that''s your problem. It should work if the wrapping element is a DIV instead. [1]:http://htmlhelp.com/reference/html40/block/p.html On Oct 26, 8:40 am, harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Dear list, > > I must be going mad. My code: > > <p class="online_more_info" style="display: none"> > > <%=h user.phone %><br /> > <%=h user.company %><br /> > <% @message = Message.new %> #UGLY, someone has a solution? > <% form_for([@project, @message]) do |f| %> > <%= f.hidden_field(''recipient_id'', :value => user.id ) %> > <%= f.text_area(''text'', :size =>"10x4") %><br /> > <%= submit_tag(''Verstuur'') %> > <% end %> > </p> > > So the form is enclosed in a hidden p tag. This works like a charm in > Opera, however in FF the form does show! ''show source'' shows the > correct HTML but Firebug shows that the p tag closes _before_ the > form. Really really weird. > Does this sound familiar to someone? > > With kind regards, > Harm > > PS @message can be empty as it is really simple, now fixed with an > ugly hack. Any suggestions?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
haarts
2007-Oct-27 18:44 UTC
Re: (remote_)for_form placement, most bizar error seen so far
That must be it. Thank you I didn''t know that(obviously). Thanks for the link as well. mboeh-UtljGsy+VVc0aPf6s/0I7w@public.gmane.org wrote:> > > The P element cannot contain block-level elements like FORM [1]. > Firefox tends to be pretty strict about form elements, so I suspect > that''s your problem. It should work if the wrapping element is a DIV > instead. > > [1]:http://htmlhelp.com/reference/html40/block/p.html > > On Oct 26, 8:40 am, harm <harmaa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Dear list, >> >> I must be going mad. My code: >> >> <p class="online_more_info" style="display: none"> >> >> <%=h user.phone %><br /> >> <%=h user.company %><br /> >> <% @message = Message.new %> #UGLY, someone has a solution? >> <% form_for([@project, @message]) do |f| %> >> <%= f.hidden_field(''recipient_id'', :value => user.id ) %> >> <%= f.text_area(''text'', :size =>"10x4") %><br /> >> <%= submit_tag(''Verstuur'') %> >> <% end %> >> </p> >> >> So the form is enclosed in a hidden p tag. This works like a charm in >> Opera, however in FF the form does show! ''show source'' shows the >> correct HTML but Firebug shows that the p tag closes _before_ the >> form. Really really weird. >> Does this sound familiar to someone? >> >> With kind regards, >> Harm >> >> PS @message can be empty as it is really simple, now fixed with an >> ugly hack. Any suggestions? > > > > > >-- View this message in context: http://www.nabble.com/%28remote_%29for_form-placement%2C-most-bizar-error-seen-so-far-tf4698078.html#a13446229 Sent from the RubyOnRails Users mailing list archive at Nabble.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 -~----------~----~----~----~------~----~------~--~---