Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Mike Duffy Newsgroups: comp.lang.javascript Subject: Re: Clicking on Disabled Controls Date: Wed, 4 Apr 2012 00:59:15 +0000 (UTC) Organization: Your Company Lines: 48 Message-ID: References: <8t2nn7tobq7196cv20msfns6hnh6mas0of@4ax.com> NNTP-Posting-Host: 8GXtu24jXTHJm9OLlhLTEQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: Xnews/5.04.25 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.javascript:13205 Gene Wirchenko wrote in news:8t2nn7tobq7196cv20msfns6hnh6mas0of@4ax.com: > ...please point me to a good reference as to what > happens when one clicks on a disabled control? > > .... Should one of the disabled buttons get clicked, > it does not get the focus, but the control that does > have focus at the time has its blur fire. > ... What is going on, event-wise? I'm not sure. Your message made me curious, and I found: http://help.dottoro.com/ljmiswgp.php Only one element can be active at a time in a document. An active element does not necessarily have focus, but an element with focus is always the active element in a document. For example, an active element within a window that is not the foreground window has no focus. To set the active element in a document, use the focus and setActive methods. To determine whether the active element has focus, use the hasFocus method. Also, at http://msdn.microsoft.com/en-us/library/aa752581%28v=vs.85% 29.aspx : You can set the active element with the setActive method or the focus method; however, using the setActive method has no effect on document focus. Use the focus method to cause an individual element to gain focus and become the active element. Note: For versions of Microsoft Internet Explorer 5 and later, the IHTMLDocument2::activeElement property is not defined until a document is loaded. A value of NULL is given for this property, if it is accessed inline during the loading of a document. This property can be accessed in the onload event handler function. I'm not sure if I'm telling you things you already know (because these are the first teo sites Google returns on a "activeElement" search), but both of these sites seem to have information related to your problem. It seems that being active does not mean the same thing as being in focus. -- http://pages.videotron.ca/duffym/index.htm