grey-out/disabled item in listbox

Discussion in 'Javascript' started by acord, Mar 11, 2006.

  1. acord

    acord Guest

    Hi,

    Is there such thing that an item in the listbox is disabled and is
    appeared grey-out?

    How can I implement this in html/javascript?

    Thanks
    A
     
    acord, Mar 11, 2006
    #1
    1. Advertising

  2. acord wrote:
    > Hi,
    >
    > Is there such thing that an item in the listbox is disabled and is
    > appeared grey-out?
    >
    > How can I implement this in html/javascript?
    >
    > Thanks
    > A


    You mean an item in a select (there's no such thing in HTML as a "listbox")?

    If so, try disabling it

    <select....>
    <option disabled value="1">One</option>
    </select>
     
    TheBagbournes, Mar 11, 2006
    #2
    1. Advertising

  3. acord

    acord Guest

    TheBagbournes wrote:
    > acord wrote:
    >
    >> Hi,
    >>
    >> Is there such thing that an item in the listbox is disabled and is
    >> appeared grey-out?
    >>
    >> How can I implement this in html/javascript?
    >>
    >> Thanks
    >> A

    >
    >
    > You mean an item in a select (there's no such thing in HTML as a
    > "listbox")?
    >
    > If so, try disabling it
    >
    > <select....>
    > <option disabled value="1">One</option>
    > </select>

    Yup, it works. thanks for your help.
    A
     
    acord, Mar 11, 2006
    #3
  4. acord

    acord Guest

    TheBagbournes wrote:
    > acord wrote:
    >
    >> Hi,
    >>
    >> Is there such thing that an item in the listbox is disabled and is
    >> appeared grey-out?
    >>
    >> How can I implement this in html/javascript?
    >>
    >> Thanks
    >> A

    >
    >
    > You mean an item in a select (there's no such thing in HTML as a
    > "listbox")?
    >
    > If so, try disabling it
    >
    > <select....>
    > <option disabled value="1">One</option>
    > </select>

    Hi, just found out this is only work with Firefox. How to get this to
    work under IE?

    Thanks
    A
     
    acord, Mar 11, 2006
    #4
    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. Anony!

    How to "grey out" a JButton?

    Anony!, Aug 15, 2004, in forum: Java
    Replies:
    3
    Views:
    847
    zoopy
    Aug 16, 2004
  2. RC
    Replies:
    2
    Views:
    14,635
    Roedy Green
    Apr 11, 2006
  3. Karl

    Javascript grey out

    Karl, Feb 15, 2009, in forum: HTML
    Replies:
    2
    Views:
    1,161
    Harlan Messinger
    Feb 15, 2009
  4. J Belly

    Grey out or disable form?

    J Belly, Feb 4, 2005, in forum: Javascript
    Replies:
    1
    Views:
    166
    Joakim Braun
    Feb 6, 2005
  5. Replies:
    3
    Views:
    212
Loading...

Share This Page