<!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.3020" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face="Trebuchet MS" size=2><SPAN class=968400514-05022007>Hi
there,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007> </SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007> I was trying to make a form with an
autocomplete text input wanting that when it is changed some text where
updated.</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007> The scenario is that you choose a
material with a code, then the text that tells the unit for that material gets
updated.</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007> I wasn't able to get it right (I'm
trying to understand the event flux with scriptaculos myself). The code I was
using is this:</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007>ShoreDialogWithModel subclass:
#BRDMaterialToUseEditor<BR> instanceVariableNames:
'code'<BR> classVariableNames: ''<BR> poolDictionaries:
''</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007>BRDMaterialToUseEditor>>renderFormOn:
html</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN class=968400514-05022007> |
codeId |<BR> codeId _ html nextId.<BR> <BR> html table:
[<BR> html tableRow:[<BR> html tableData:[html text:
'Material Code'].<BR> html
tableData:[<BR> html
textInput<BR> id:
'code';<BR> value:
code;<BR> callback:[:value| code _
value];<BR> onChange: (html
updater<BR> id:
codeId;<BR> triggerForm:
'code';<BR> callback:[:r|
self renderUnitOn:
r]);<BR> yourself.<BR> html
div<BR> class:
'autocomplete';<BR> script:
(<BR> html
autocompleter<BR> element:
'code';<BR> onSelected:(<BR> html
request<BR> triggerFormElement:
'code');<BR> on: #renderCodeListOn: of:
self;<BR> yourself)].<BR> ].<BR> html
tableRow:[<BR> html tableData:[html text:
'Quntity'].<BR> html tableData:[html textInput on: #quantity
of: model]].<BR> html tableRow:[<BR> html
tableData:[html text: 'Unit'].<BR> html tableData:[html div id:
'unit'; with: [self renderUnitOn:
html]].<BR> ].<BR> ]</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007> Any comments are
welcomed,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=968400514-05022007> thanks,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></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<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/><o:p></o:p></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><o:p> </o:p></SPAN></P></DIV></SPAN></BODY></HTML>