Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #13205

Re: Clicking on Disabled Controls

From Mike Duffy <Use_guestbook_page@website.in.sig>
Newsgroups comp.lang.javascript
Subject Re: Clicking on Disabled Controls
Date 2012-04-04 00:59 +0000
Organization Your Company
Message-ID <XnsA02AD5826113Binvalidcom@94.75.214.39> (permalink)
References <8t2nn7tobq7196cv20msfns6hnh6mas0of@4ax.com>

Show all headers | View raw


Gene Wirchenko <genew@ocis.net> 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

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Clicking on Disabled Controls Gene Wirchenko <genew@ocis.net> - 2012-04-03 16:57 -0700
  Re: Clicking on Disabled Controls Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-04-04 00:59 +0000
    Re: Clicking on Disabled Controls Gene Wirchenko <genew@ocis.net> - 2012-04-03 21:42 -0700
  Re: Clicking on Disabled Controls BootNic <bootnic.bounce@gmail.com> - 2012-04-04 02:31 -0400

csiph-web