<font face="arial" size="2"><br />&nbsp;&nbsp;&nbsp;If you can't disable an option (it's possible that I could be wrong once this year), you might consider getting creative with the JS if you don't want to eliminate that option completely.&nbsp; For example, you could color the text or background differently, and then hook up the onchange event handler to a function.&nbsp; The function can check to see if the list is on a "forbidden" option, and then either (a) clear the selection or (b) re-select the previously-selected value.<br /><br />FWIW...<br /><br />Peter<br /><br /></font><font face="Tahoma, Arial, Sans-Serif" size="2"><b>From</b>: Chuck Soper <a href="mailto:chucks@velofish.com">chucks@velofish.com</a><br /></font><br />Thanks. I tried that and it didn't work either. I will take a totally <br />different approach. That is, I'll accept that it's not possible to <br />"disable individual options in a select element" as Peter Brunone <br />suggested.<br />Thanks for everyone's help.<br />Chuck<br /><br />At 10:55 AM +0100 3/1/05, Hakan M (Backbase) wrote:<br />&gt;I suppose it doesn't work in IE. For a slightly non-kosher solution, <br />&gt;you could try<br />&gt;<br />&gt;element['disabled'] = 'disabled';<br />&gt;<br />&gt;Don't make a habit out of it. ;)<br />&gt;<br />&gt;Regards,<br />&gt;H<br />&gt;<br />&gt;Chuck Soper wrote:<br />&gt;&gt;Paul,<br />&gt;&gt;<br />&gt;&gt;Thanks for your response.<br />&gt;&gt;<br />&gt;&gt;I added the following line to the popuplateBreadSelect function:<br />&gt;&gt; element.setAttribute("disabled", "disabled");<br />&gt;&gt;but, it doesn't work.<br />&gt;&gt;<br />&gt;&gt;I read the w3.org link and noticed the disabled attribute for the <br />&gt;&gt;Option Element states: unavailable in this context.<br />&gt;&gt;<br />&gt;&gt;Do you know how or if I can modify my code to get this to work? I <br />&gt;&gt;can disable the entire dropdown, but not individual elements.<br />&gt;&gt;source: http://www.velofish.com/menu/menuTest.js<br />&gt;&gt;<br />&gt;&gt;Chuck<br />&gt;&gt;<br />&gt;&gt;At 10:35 PM -0800 2/28/05, Paul Novitski wrote:<br />&gt;&gt;<br />&gt;&gt;&gt;At 07:19 PM 2/28/2005, Chuck Soper wrote:<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;&gt;I'm trying to display disabled menu items.<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;Chuck,<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;To disable a select option, just add the "disabled" attribute to the tag:<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;HTML: <option disabled="">Banana</option><br />&gt;&gt;&gt;XHTML: <option disabled="">Banana</option><br />&gt;&gt;&gt;<br />&gt;&gt;&gt;The disabled option is greyed out and can't be selected.<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;You can set this attribute with Javascript using code like this:<br />&gt;&gt;&gt;<br />&gt;&gt;&gt; oOption.setAttribute("disabled", "disabled");<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;where oOption is the OPTION object.<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;The disabled option is listed as an attribute of OPTION in the W3C <br />&gt;&gt;&gt;HTML specification:<br />&gt;&gt;&gt;<br />&gt;&gt;&gt; The SELECT, OPTGROUP, and OPTION elements<br />&gt;&gt;&gt; http://www.w3.org/TR/html4/interact/forms.html#h-17.6<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;(scroll down to the OPTION section)<br />&gt;&gt;&gt;<br />&gt;&gt;&gt;Paul<br />&gt;&gt;<br />&gt;&gt;_______________________________________________<br />&gt;&gt;Javascript mailing list<br />&gt;&gt;Javascript@LaTech.edu<br />&gt;&gt;https://lists.LaTech.edu/mailman/listinfo/javascript<br />&gt;&gt;<br />&gt;_______________________________________________<br />&gt;Javascript mailing list<br />&gt;Javascript@LaTech.edu<br />&gt;https://lists.LaTech.edu/mailman/listinfo/javascript<br /><br />_______________________________________________<br />Javascript mailing list<br />Javascript@LaTech.edu<br />https://lists.LaTech.edu/mailman/listinfo/javascript<br /><br />