This works fine for me in trunk/4.7, Firefox 3.5 DHTML - with the
debugger off. What version of OpenLaszlo and browser are you running?
Omar BELKHODJA wrote:
Hello,
I'm quite new to openlaszlo. I've started a little program with
login/password window. I want to have the cursor at the starting of the
application focusing into the login textedit. This doesn't seem to be
working with the piece of code I've writen (tested in firefox/swf9).
Below is the source code. Doesn't anybody know why it doesn't work ?
Thanks !
<?xml version="1.0" encoding="UTF-8" ?>
<canvas id="Canvas" width="100%" height="100%" bgcolor="#EAEAEA"
align="center" valign="middle">
<handler name="oninit">
Debug.debug('canvas init');
lz.Focus.setFocus(LoginEdit.parent);
Debug.debug(lz.Focus);
Debug.inspect(lz.Focus.getFocus());
</handler>
<window id="LoginDlg" title="Welcome to Kanfous !" clickable="false"
width="200" opacity="1" bgcolor="#EAEAEA" x="${(Canvas.width -
LoginDlg.width) / 2}" y="${(Canvas.height - LoginDlg.height) / 2}">
<handler name="oninit">
Debug.debug('window init');
//this.animate('opacity',1,500,false);
</handler>
<simplelayout axis="y" />
<view width="100%">
<handler name="oninit">
Debug.debug('view init');
</handler>
<simplelayout axis="x" />
<text width="60">Login</text>text>
<edittext id="LoginEdit" width="100%"></edittext>
</view>
<view width="100%">
<simplelayout axis="x"/>
<text width="60">Password</text>text>
<edittext id="PasswordEdit" password="true"
width="100%"></edittext>
</view>
<view align="right">
<simplelayout axis="x" spacing="10" />
<button onclick="parent.parent.close()">Cancel</button>
<button onclick="parent.parent.close()"
isdefault="true">OK</button>
</view>
</window>
</canvas>
--
Regards,
Max Carlson
OpenLaszlo.org