Re: Optgroup </optgroup> and display: none style ...

Discussion in 'HTML' started by Bergamot, Oct 10, 2008.

  1. Bergamot

    Bergamot Guest

    Koteczek wrote:
    >
    > browsers do not do what they should do
    >
    > <select ....>
    > ....
    > <optgroup label="ABCDEF" style="display: none;" id="hidden">
    > <option ....>something 1</option>
    > <option ....>something 2</option>
    > </optgroup>
    > ....
    > </select>
    >
    > I must have it like the code = this one optgroup must be hidden and I display
    > it when I want via JavaScript.


    Styling of various form controls is very hit or miss in different
    browsers. You cannot rely on consistent rendering, so don't waste time
    getting frustrated over it. If this is functionality you *must* have,
    find an alternative way to do it.

    If you're using JavaScript anyway, you might append/insert the optgroup
    via JS when the appropriate conditions are met. Or use AJAX to get the
    info from the server. I suggest posting in the JS newsgroup for further
    discussion: comp.lang.javascript

    --
    Berg
    Bergamot, Oct 10, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adrienne Boswell
    Replies:
    8
    Views:
    849
    Bergamot
    Oct 18, 2008
  2. Jukka K. Korpela
    Replies:
    1
    Views:
    2,417
    Ari Heino
    Oct 17, 2008
  3. length power
    Replies:
    2
    Views:
    59
    Rustom Mody
    Apr 10, 2014
  4. Skip Montanaro
    Replies:
    0
    Views:
    41
    Skip Montanaro
    Apr 10, 2014
  5. Johannes Schneider

    Re: why i have the output of [None, None, None]

    Johannes Schneider, Apr 10, 2014, in forum: Python
    Replies:
    0
    Views:
    37
    Johannes Schneider
    Apr 10, 2014
Loading...

Share This Page