2 Replies Latest reply: May 15, 2012 1:25 AM by BKBK RSS

    disabled property does not work in IE

    kt03 Community Member

      I want to disable the box from the option in the menu, not the select itself.

      This code is worked on FF but not on IE.  Is there the way to have the option disable work on IE? or make it ready only?

        i also try to change the gray color from the disable using css but still not work on IE:

      <select name="re">

      <cfloop query="qry">

      <option value="#qry.re_id#" disabled >#qry.re_name#

      </option>

      </cfloop>

      </select>

       

      thanks

       

      kt

        • 1. Re: disabled property does not work in IE
          Dan Bracuk Community Member

          First, you are not using the correct syntax to disable your options.  A google search on "html input disable" will lead you to the correct syntax.

           

          Next, you say that you do not want to disable the select, but you are attempting to disable all the options.  That seems very odd.

          • 2. Re: disabled property does not work in IE
            BKBK MVP

            As Dan says, be aware that the loop implies each option element will have a disabled attribute. Since you have to output, use the cfoutput loop (update: unless, of course, the code you've shown is already within the cfoutput tag):

             

            <select name="re">

            <cfoutput query="qry">

            <option value="#qry.re_id#" disabled >#qry.re_name#

            </option>

            </cfoutput>

            </select>