Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down option labels -- not yet

    From W3C HTML 4.01:

    OPTION Attribute definitions

    label = text [CS]

    This attribute allows authors to specify a shorter label for an option than the content of the OPTION element. When specified, user agents should use the value of this attribute rather than the content of the OPTION element as the option label.


    Umm... why are there little things like this that browsers do not implement...

    Will they ever live up to the spec?
    *this message will self destruct in n-seconds*

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wait, what?

    Sounds like:

    <option value="actual value">Shown Value</option>

    Which actually does work in today's UAs...

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The label should be the shown value, according to the spec.
    *this message will self destruct in n-seconds*

  • #4
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So what's the advantage to that then? I, and apparently most everyone else, have been getting along fine with what's available...

    <option>This is the assumed value.</option>
    <option value="This is the assumed value.">This is NOT the assumed value.</option>

  • #5
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The W3C decided that such a feature was important, and should be implemented by user agents.
    Here is their demonstration of its use:
    In this example we use the OPTGROUP element to group choices. The following markup:

    Code:
    <FORM action="http://somesite.com/prog/someprog" method="post">
     <P>
     <SELECT name="ComOS">
         <OPTION selected label="none" value="none">None</OPTION>
         <OPTGROUP label="PortMaster 3">
           <OPTION label="3.7.1" value="pm3_3.7.1">PortMaster 3 with ComOS 3.7.1</OPTION>
           <OPTION label="3.7" value="pm3_3.7">PortMaster 3 with ComOS 3.7</OPTION>
           <OPTION label="3.5" value="pm3_3.5">PortMaster 3 with ComOS 3.5</OPTION>
         </OPTGROUP>
         <OPTGROUP label="PortMaster 2">
           <OPTION label="3.7" value="pm2_3.7">PortMaster 2 with ComOS 3.7</OPTION>
           <OPTION label="3.5" value="pm2_3.5">PortMaster 2 with ComOS 3.5</OPTION>
         </OPTGROUP>
         <OPTGROUP label="IRX">
           <OPTION label="3.7R" value="IRX_3.7R">IRX with ComOS 3.7R</OPTION>
           <OPTION label="3.5R" value="IRX_3.5R">IRX with ComOS 3.5R</OPTION>
         </OPTGROUP>
     </SELECT>
    </FORM>
    represents the following grouping:

    Code:
      None
      PortMaster 3
          3.7.1
          3.7
          3.5
      PortMaster 2
          3.7
          3.5
      IRX
          3.7R
          3.5R
    Does it actually work? No! Why? Because nobody bothered to implement it.
    *this message will self destruct in n-seconds*

  • #6
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm lost.

    http://www.offtone.com/scripts/optgroup.html

    Seems to work for me. What exactly is the problem?

    Edit:

    Oh I see... Label on <option>, not colgroup...

    Wait, so, wtf? Why on earth would you want to do that? The <option> tag's contents then become useless, no?
    Last edited by AaronW; 10-03-2004 at 10:39 PM.

  • #7
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why on earth would we want to have any features from the standard?
    *this message will self destruct in n-seconds*

  • #8
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dude, you aren't following... User Agents didn't implement it because it's redundant. Why would you want to do that? I'll change my mind if you can detail one situation where it'd be useful to do this...

    Much like a:link (also a standard) it's redundant.

  • #9
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The WDG provides detailed reasoning, here:
    http://www.htmlhelp.com/reference/ht...ms/option.html

    Redundancy is a good thing, btw; it reduces the likelihood of failure.
    *this message will self destruct in n-seconds*

  • #10
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah, so it's there just for backward compatibility. Not sure why it was left out, as it'd be easy to do, but I bet that example of why it'd be useful wasn't in the spec, so UA makers were as baffled as I was as to why it'd ever be used :S

  • #11
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Imagine a day when developers stop second guessing the spec., and give us a full implementaion. (I bet that never happens, the fools...)
    *this message will self destruct in n-seconds*

  • #12
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The spec is huge. If they implemented everything, I wonder how big browsers would be... I'd like to think they implement what's most likely to be used, and which bits are being asked for the most (which are probably the same bits.)

  • #13
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Half-assed implementations are the whole problem... ok, that's enough complaining on my part.
    *this message will self destruct in n-seconds*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •