Erwin
2012-Oct-16 17:43 UTC
<form> tag is self-closing before input fields .. (HAML generator used)
The form is inside a table, enclosing a <tr> = form_tag admins_backoffice_dashboards_path, :remote =>"true" do %tr.search %th= link_to t(:clear), "#", :id => :clearFilter %th= select_tag :role, options_from_collection_for_select(Role.global, :id, :name, :selected => @role_id ) %th= text_field_tag :email, nil, :value => @email %th= submit_tag t(:search).capitalize the generated html code is : <table class="table table-condensed"> <form method="post" data-remote="true" action="/en/backoffice/ dashboards/admins" accept-charset="UTF-8"></form> <tr class="search"> <th><a id="clearFilter" href="#">Clear</a></th> <th> <select name="role" id="role" class="input-medium list"> </option><option value="2">superadmin</option> <option value="3">manager</option> <option value="4">employee</option> </select> </th> <th><input type="text" name="email" id="email"></ th> <th><input type="submit" value="Search" name="commit"></th> </tr> </table> what could be wrong ..? is it so obvious ? thanks for feedback -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hassan Schroeder
2012-Oct-16 17:53 UTC
Re: <form> tag is self-closing before input fields .. (HAML generator used)
On Tue, Oct 16, 2012 at 10:43 AM, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote:> The form is inside a table, enclosing a <tr>That''s not legal markup. Either wrap the form around the entire table or put it completely inside a cell. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Erwin
2012-Oct-16 22:15 UTC
Re: <form> tag is self-closing before input fields .. (HAML generator used)
Thanks , I had that feeling... I''ll test it by tomorrow ... is there any links related to this being illegal ? just for my notetaker pad ... On 16 oct, 19:55, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Oct 16, 2012 at 10:43 AM, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > The form is inside a table, enclosing a <tr> > > That''s not legal markup. Either wrap the form around the entire table > or put it completely inside a cell. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hassan Schroeder
2012-Oct-16 23:58 UTC
Re: Re: <form> tag is self-closing before input fields .. (HAML generator used)
On Tue, Oct 16, 2012 at 3:15 PM, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote:> Thanks , I had that feeling... I''ll test it by tomorrow ... is there > any links related to this being illegal ? just for my notetaker > pad ...The HTML 4.01 DTDs are what I usually refer to when in doubt: <http://www.w3.org/TR/REC-html40/sgml/dtd.html> I''m under the impression HTML 5 doesn''t use DTDs but I''m trying to leave markup to others as much as possible these days :-) HTH! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2012-Oct-17 07:37 UTC
Re: Re: <form> tag is self-closing before input fields .. (HAML generator used)
On 16 October 2012 23:15, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote:> Thanks , I had that feeling... I''ll test it by tomorrow ... is there > any links related to this being illegal ? just for my notetaker > pad ...If ever you have any markup and you just want to check whether it is legal you can paste it into the w3c html validator and it will check it for you. In fact any time a page is misbehaving in a strange way it is a good idea to check the html for validity, and before any page is made public it should be checked. Even if a page looks ok there may still be invalid html there which can make it perform differently on different browsers. Colin> > On 16 oct, 19:55, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Tue, Oct 16, 2012 at 10:43 AM, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: >> > The form is inside a table, enclosing a <tr> >> >> That''s not legal markup. Either wrap the form around the entire table >> or put it completely inside a cell. >> >> -- >> Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder >> twitter: @hassan > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Jordon Bedwell
2012-Oct-17 08:13 UTC
Re: Re: <form> tag is self-closing before input fields .. (HAML generator used)
On Wed, Oct 17, 2012 at 2:37 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 16 October 2012 23:15, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote: >> Thanks , I had that feeling... I''ll test it by tomorrow ... is there >> any links related to this being illegal ? just for my notetaker >> pad ... > > If ever you have any markup and you just want to check whether it is > legal you can paste it into the w3c html validator and it will check > it for you. In fact any time a page is misbehaving in a strange way > it is a good idea to check the html for validity, and before any page > is made public it should be checked. Even if a page looks ok there > may still be invalid html there which can make it perform differently > on different browsers.Since I didn''t see the rest of this I''ll just comment as if it''s future-proofed markup. In HTML5 <form /> simply means <form>, it''s a grey area, it''s not allowed but it''s parsed and even has parsing rules but it means <form> so you will end up with a parsing error eventually possibly. It has parsing rules because of XML and XHTML. It does not mean <form></form> like most people assume. While I agree with Colin that you should check with the W3 validator I also think that you should take any of the HTML5 markup validations with a grain of salt and refer to the spec http://dev.w3.org/html5/spec/ because there are grey areas that will get you later. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2012-Oct-17 08:34 UTC
Re: Re: <form> tag is self-closing before input fields .. (HAML generator used)
On 17 October 2012 09:13, Jordon Bedwell <envygeeks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Oct 17, 2012 at 2:37 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 16 October 2012 23:15, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote: >>> Thanks , I had that feeling... I''ll test it by tomorrow ... is there >>> any links related to this being illegal ? just for my notetaker >>> pad ... >> >> If ever you have any markup and you just want to check whether it is >> legal you can paste it into the w3c html validator and it will check >> it for you. In fact any time a page is misbehaving in a strange way >> it is a good idea to check the html for validity, and before any page >> is made public it should be checked. Even if a page looks ok there >> may still be invalid html there which can make it perform differently >> on different browsers. > > Since I didn''t see the rest of this I''ll just comment as if it''s > future-proofed markup. In HTML5 <form /> simply means <form>, it''s a > grey area, it''s not allowed but it''s parsed and even has parsing rules > but it means <form> so you will end up with a parsing error eventually > possibly. It has parsing rules because of XML and XHTML. It does not > mean <form></form> like most people assume.I don''t understand what you mean by "it''s not allowed". If it parses without an error then how can it not be allowed? Or are you pointing out that the spec is inconsistent? Why would one want to do <form /> anyway? Colin> > While I agree with Colin that you should check with the W3 validator I > also think that you should take any of the HTML5 markup validations > with a grain of salt and refer to the spec > http://dev.w3.org/html5/spec/ because there are grey areas that will > get you later. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Frederick Cheung
2012-Oct-17 08:44 UTC
Re: <form> tag is self-closing before input fields .. (HAML generator used)
On Tuesday, October 16, 2012 6:55:04 PM UTC+1, Hassan Schroeder wrote:> > On Tue, Oct 16, 2012 at 10:43 AM, Erwin <yves_...-ee4meeAH724@public.gmane.org <javascript:>> > wrote: > > The form is inside a table, enclosing a <tr> > > That''s not legal markup. Either wrap the form around the entire table > or put it completely inside a cell. > >Although haml doesn''t know that - it will quite happily generate markup that is invalid in that way. My money would be the the tr is indented with something that looks like a space to a human, but not to haml (maybe a tab or one of the funky unicode spacing characters) Fred> -- > Hassan Schroeder ------------------------ hassan.s...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:> > http://about.me/hassanschroeder > twitter: @hassan >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/lMjP-2tA7a4J. For more options, visit https://groups.google.com/groups/opt_out.
Jordon Bedwell
2012-Oct-17 08:44 UTC
Re: Re: <form> tag is self-closing before input fields .. (HAML generator used)
On Wed, Oct 17, 2012 at 3:34 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I don''t understand what you mean by "it''s not allowed". If it parses > without an error then how can it not be allowed? Or are you pointing > out that the spec is inconsistent? > > Why would one want to do <form /> anyway?That''s exactly what I mean by a grey area, it''s one of those things that you''re not supposed to do, it''s "not allowed" but they allow it to parse and pass because it''s so popular and because it was so widely used prior to HTML5 via XHTML from XML, that and it''s converted to <tag> which is perfectly valid in some circumstance. I don''t quite remember if there was intent to make it fully illegal but right now it''s a grey area in that it parses but you are not supposed to do it because it''s "not allowed" in HTML5. TL;DR <form /> -> <form> = valid but could lead to parse error because of nesting issues. <form /> is not legal in HTML5 but parsed and "passed" because of syntactic sugar and XML. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Reasonably Related Threads
- How can I disable Rails 3.1's ActiveRecord Query Caching?
- rake aborted!
- Chronic parsing date range in console but not in application in rails 3
- Advice needed --- Best way to get mysql2 gem installed to interact with Mysql Database?
- We're sorry, but something went wrong on Tomcat