<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face="Trebuchet MS" size=2><SPAN class=500561113-03102007>Hey 
there!</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp; it's me searching wrongly or there 
is no javascript to query which element has focus in a form?</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp; We want some input text #change to 
update some component but after the update the focus remains on it. Well in fact 
even better will be that the focus remains in the different input text that had 
caused the #change to trigger. </SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp; I've tried to emulate this by making 
the updater like this:</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp; 
[:html|<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; html 
updater<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
id: self 
id;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
evalScripts: 
true;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
callback:[:focusId| lastFocusId := 
focusId]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
value: (html 
formElement&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
id: (self at: aSymbol) inputElementId; 
id);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
callback:[:v | (self at: aSymbol) model setValue: 
v]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value: 
(html 
formElement&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
id: (self at: aSymbol) 
inputElementId;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
callback:[:h| self renderInnerContentOn: 
h.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h 
script: (h formElement id: lastFocusId; 
focus)];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
yourself<BR>&nbsp;&nbsp;&nbsp; ]</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp;&nbsp;but this does not work for some 
reason I dont get yet</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp;&nbsp;Did&nbsp;anyone managed to 
recover focus state&nbsp;in a similar scenario? any&nbsp;idea on how to do 
it?</SPAN></FONT><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN 
class=500561113-03102007></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><SPAN class=250542422-20122006>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><?xml:namespace prefix 
= st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:PersonName 
ProductID="Sebastian Sastre&#13;" w:st="on"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">Sebastian 
Sastre</SPAN></st1:PersonName></SPAN></P></DIV></BODY></HTML>