option group

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shock

    option group

    Does anybody know of a way to make the Routers label the default value
    instead of the value at index 0? Using javascript or basic xhtml?

    Here is the code.

    <select name = "product">
    <optgroup label = "Routers">
    <option>Lan11 </option>
    <option>Lan12 </option>
    </optgroup>
    </select>

    Thanks ahead.

    Shock

    BTW, I am using this on IE6



  • Thomas 'PointedEars' Lahn

    #2
    Re: option group

    Shock wrote:
    [color=blue]
    > Does anybody know of a way to make the Routers label the default value
    > instead of the value at index 0? Using javascript or basic xhtml?[/color]

    Basic XHTML.
    [color=blue]
    > Here is the code.
    >
    > <select name = "product">
    > <optgroup label = "Routers">
    > <option>Lan11 </option>
    > <option>Lan12 </option>
    > </optgroup>
    > </select>[/color]

    Labels cannot be selected, but options can:

    <select name="product">
    ...
    <optgroup label = "Routers">
    <option selected="selec ted">Lan11</option>
    <option>Lan12 </option>
    </optgroup>
    ...
    </select>


    PointedEars

    Comment

    • Shock

      #3
      Re: option group

      Thanks, that is what I thought.

      Shock

      "Thomas 'PointedEars' Lahn" <PointedEars@we b.de> wrote in message
      news:3F97C899.7 070403@PointedE ars.de...[color=blue]
      > Shock wrote:
      >[color=green]
      > > Does anybody know of a way to make the Routers label the default value
      > > instead of the value at index 0? Using javascript or basic xhtml?[/color]
      >
      > Basic XHTML.
      >[color=green]
      > > Here is the code.
      > >
      > > <select name = "product">
      > > <optgroup label = "Routers">
      > > <option>Lan11 </option>
      > > <option>Lan12 </option>
      > > </optgroup>
      > > </select>[/color]
      >
      > Labels cannot be selected, but options can:
      >
      > <select name="product">
      > ...
      > <optgroup label = "Routers">
      > <option selected="selec ted">Lan11</option>
      > <option>Lan12 </option>
      > </optgroup>
      > ...
      > </select>
      >
      >
      > PointedEars
      >[/color]


      Comment

      Working...