Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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>