dcsimg
Javascript: disable select list dynzmically in IE
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jeanne_Boyarsky
Posted On:   Tuesday, September 17, 2002 04:49 PM

Does anyone know of a way to dynamically disable/enable the select list in Javascript? The idea is that the select box should only be enabled when other form elements on the page are selected.


Workarounds I have seen on the web involve using Javascript events to disallow the user from selecting anything, but this doesn't have the effect of graying out the box. In particular, it's not obvious that the user shouldn't select it.


I know this is impossible in Netscape, but can it be done in IE?

Re: Javascript: disable select list dynzmically in IE

Posted By:   Firat_Tiryaki  
Posted On:   Friday, September 20, 2002 07:48 AM

document.formName.disabled

Re: Javascript: disable select list dynzmically in IE

Posted By:   Jeanne_Boyarsky  
Posted On:   Wednesday, September 18, 2002 05:19 PM

Thanks. In hindsight, that should have been obvious :)

Re: Javascript: disable select list dynzmically in IE

Posted By:   Nitesh_Naveen  
Posted On:   Wednesday, September 18, 2002 02:07 AM

disabled property does work in IE and netscape 6+

Re: Javascript: disable select list dynzmically in IE

Posted By:   Brian_Glodde  
Posted On:   Tuesday, September 17, 2002 08:21 PM

Sure, just set it to "disabled"




Disabled in IE









You can also set it in IE by using:
"document.forms[0].selTest.disabled = true|false;"
About | Sitemap | Contact