Forum: Ruby on Rails Specifying multiple for select

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
cool_screen_name90001 (Guest)
on 2005-12-11 12:51
(Received via mailing list)
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
Phillip H. (Guest)
on 2005-12-11 19:44
(Received via mailing list)
On 11/12/2005, at 11:48 PM, CSN wrote:

> 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 H.
removed_email_address@domain.invalid
CSN (Guest)
on 2005-12-11 21:30
(Received via mailing list)
--- Phillip H. <removed_email_address@domain.invalid>
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"'.

csn


> 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
Andreas S. (Guest)
on 2005-12-11 21:53
CSN wrote:
> --- Phillip H. <removed_email_address@domain.invalid>
> 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.
Phillip H. (Guest)
on 2005-12-11 22:00
(Received via mailing list)
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 H.
removed_email_address@domain.invalid
CSN (Guest)
on 2005-12-11 22:12
(Received via mailing list)
<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
This topic is locked and can not be replied to.