Making form options unselectable

Results 1 to 2 of 2

Thread: Making form options unselectable

  1. #1
    Join Date
    Dec 1969

    Default Making form options unselectable

    Hi,<BR>I have a form that reads users selections from a given dropdown list (multiple selections ARE possible). Is there a way to "grey out" an option in a list so that it is not selectable? I am trying to provide subheadings in the dropdown list, but I don&#039;t want the titles of these subheadings to be a selectable option. Anyone have any thoughts on how this might be possible? Thanks in advance!<BR>James

  2. #2
    Join Date
    Dec 1969

    Default No way cross-browser...

    You might be able to do this in MSIE by setting a STYLE in the OPTION (never tried it...dunno if it works), but that won&#039;t work in other browsers, regardless.<BR><BR>How about this, instead: Put a little mark in front of all the disabled ones (or enabled ones...whichever makes most sense) and then use a tiny bit of JavaScript code to *effectively* disable those options? (That is, have an onBlur handler that looks to see if user chose a disabled option and, if so, remove the choice from those selected.)<BR><BR>

Posting Permissions

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