Community Forums 

Main Content

How to make an item not selectable in a drop down menu

    Jan 04 2012 17:52:51

    #1

    SteveMck

    Join date : 2011-11-29      Posts : 19

    Hi
    Could someone tell me if it is possible to do the above and what code would i need to use in the form?
    Thanks

    Steve



    Jan 04 2012 19:46:18

    #2

    Don

    Join date : 2008-09-18      Posts : 509

    Simply remove the coding from the drop down.

    DB.

    www.donbarrow.co.uk
    www.pacenotes.com
    Please either Share or Like my Facebook




    Jan 04 2012 20:59:18

    #3

    anon

    Join date : 2008-09-18      Posts : 488

    If you want it to be visible, but not selectable you can disable it like this:
    <option disabled="disabled">Non-selectable option</option>



    Jan 09 2012 09:50:49

    #4

    SteveMck

    Join date : 2011-11-29      Posts : 19

    anon said If you want it to be visible, but not selectable you can disable it like this:
    <option disabled="disabled">Non-selectable option</option>


    Would this make the whole drop down not selectable? I have a dropdown like this

    ---Select Colour---
    Brown
    Black

    And i want the select colour option to not be selectable.



    Jan 09 2012 10:06:22

    #5

    GT

    Join date : 2008-09-18      Posts : 3240

    <option disabled="disabled">---Select Colour---</option>

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Jan 10 2012 06:11:28

    #6

    SteveMck

    Join date : 2011-11-29      Posts : 19

    thanks for your help GT and anon



    Jan 10 2012 08:41:36

    #7

    Geoff

    Join date : 2008-09-18      Posts : 418

    <option disabled> does not work in Internet Explorer versions less than 8. If this is an issue that you want to address then there are workarounds and alternative solutions available.