<!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> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007> 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> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007> 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> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007> 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>
[:html|<BR> html
updater<BR>
id: self
id;<BR>
evalScripts:
true;<BR>
callback:[:focusId| lastFocusId :=
focusId]<BR>
value: (html
formElement <BR>
id: (self at: aSymbol) inputElementId;
id);<BR>
callback:[:v | (self at: aSymbol) model setValue:
v]<BR> value:
(html
formElement <BR>
id: (self at: aSymbol)
inputElementId;<BR> value);<BR>
callback:[:h| self renderInnerContentOn:
h.<BR> h
script: (h formElement id: lastFocusId;
focus)];<BR>
yourself<BR> ]</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007> 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> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007> Did anyone managed to
recover focus state in a similar scenario? any idea on how to do
it?</SPAN></FONT><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007>
</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=500561113-03102007></SPAN></FONT> </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 " w:st="on"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">Sebastian
Sastre</SPAN></st1:PersonName></SPAN></P></DIV></BODY></HTML>