With select(), how can I get it to just add ''multiple'' to the tag? Here''s what I''m doing: select ''obj'', ''prop'', collection, {}, {:multiple=>true, :size=>10} which outputs: <select multiple="multiple" name="obj[prop]" size="10"> I''d like it to look like this: <select multiple name="obj[prop]" size="10"> Possible? thanks csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On 11/12/2005, at 11:48 PM, CSN wrote:> With select(), how can I get it to just add ''multiple'' > to the tag? Here''s what I''m doing: > > select ''obj'', ''prop'', collection, {}, > {:multiple=>true, :size=>10} > > which outputs: > <select multiple="multiple" name="obj[prop]" > size="10"> > > I''d like it to look like this: > <select multiple name="obj[prop]" size="10"> > > Possible?What''s wrong with multiple="multiple"? It''s perfectly valid. -- Phillip Hutchings phillip.hutchings-QrR4M9swfipWk0Htik3J/w@public.gmane.org
--- Phillip Hutchings <sitharus-rails-QrR4M9swfipWk0Htik3J/w@public.gmane.org> wrote:> > On 11/12/2005, at 11:48 PM, CSN wrote: > > > With select(), how can I get it to just add > ''multiple'' > > to the tag? Here''s what I''m doing: > > > > select ''obj'', ''prop'', collection, {}, > > {:multiple=>true, :size=>10} > > > > which outputs: > > <select multiple="multiple" name="obj[prop]" > > size="10"> > > > > I''d like it to look like this: > > <select multiple name="obj[prop]" size="10"> > > > > Possible? > > What''s wrong with multiple="multiple"? It''s > perfectly valid.Uh, because the spec says ''multiple'' not ''multiple="multiple"''. csn> > > -- > Phillip Hutchings > phillip.hutchings-QrR4M9swfipWk0Htik3J/w@public.gmane.org > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
CSN wrote:> --- Phillip Hutchings <sitharus-rails-QrR4M9swfipWk0Htik3J/w@public.gmane.org> > wrote: > >> > which outputs: >> > <select multiple="multiple" name="obj[prop]" >> > size="10"> >> > >> > I''d like it to look like this: >> > <select multiple name="obj[prop]" size="10"> >> > >> > Possible? >> >> What''s wrong with multiple="multiple"? It''s >> perfectly valid. > > Uh, because the spec says ''multiple'' not > ''multiple="multiple"''.''multiple'' is no valid X(HT)ML. Every attribute must have a value. -- Posted via http://www.ruby-forum.com/.
On 12/12/2005, at 8:27 AM, CSN wrote:> Uh, because the spec says ''multiple'' not > ''multiple="multiple"''.It''s not valid XHTML. HTML 3 maybe, but all HTML parsers will accept multiple="multiple", plus you get XHTML compliance should you need it. Who looses here? -- Phillip Hutchings phillip.hutchings-QrR4M9swfipWk0Htik3J/w@public.gmane.org
<select multiple> is valid HTML 4.01: http://www.w3.org/TR/html4/interact/forms.html#h-17.6 But you two are correct, attributes must have values in XHTML: http://www.w3.org/TR/xhtml1/#h-4.4 Well, as long as browsers can handle ''multiple="multiple"'' and ''selected="selected"'' (which at least my Firefox and IE can)... csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com