John J Lee <[EMAIL PROTECTED]> writes:

> On Wed, 14 Oct 2003, Gisle Aas wrote:
> > John J Lee <[EMAIL PROTECTED]> writes:
> [...]
> > I could potentially let there be multiple 'value_names' for a single
> > value, but I could also just let an explicit label override the option
> > as per spec.  Is this something that real browsers implement?
> 
> I'm not sure I understand what you're asking.

I was thinking about the label attribute.  Consider this form:

 <form action="http://xxx";>
  <select name=foo>
   <option>1</option>
   <option label=x value=3>2</option>
  </select>
  <input type=submit>
 </form>

Of the browsers I have here Mozilla displays "2" for the second value
while konqueror shows "x".  I guess my question is what MSIE shows?

> >
> > I think so.  The problem is to know where to stop collecting text.  I
> > implemented a new get_phrase method to HTML::TokeParser to get it to
> > do what I think makes sense.  It will deal with stuff like:
> >
> >    <input name=sex type=radio value=F> <b>Fe</b>male
> >
> > in the expected way.
> 
> Officially, those <b>s aren't allowed, are they?

Yes.  After the input you are in plain text context.  The input tag is
implicitly empty.

> seen them 'in the wild', though :-(  Probably I should strip tags even for
> OPTION element contents...

But I think <option> is different as it is a container.  You can't
have <b> here, but I have not tested what browsers do.

> > >  Of course, there can also be explicit LABEL elements, but I suspect
> > > people rarely use them, so probably not very useful.
> >
> > All the examples in the HTML4 spec use the label more like a prompt
> > text and as such it is more an alternative name for the input.  The
> > following example is given:
> [...]
> 
> I see.  It can still be used for the list items of INPUT type=radio, or
> whatever, though (though, as I said, probably rarely).

I'll deal with it if somebody complains :)

--Gisle

Reply via email to