rolfpf
02-20-2005, 05:30 PM
I am extending the Login feature of the dashboard application where the user has to enter the username and password which is then passed to the Authenticate.class for validation.
My problem is in the code below: when I want to capture the username I use username.text and it returns the username that was entered into the field. When I use passid.text to retrieve the password I get a blank.
Anyone know how I can capture the password as shown below?
Code:----------------------------------------------
<view name="loginView" x="70" y="35" width="${ parent.width }">
<view>
<text x="2" y="2" width="200" height="35">
<font size="11">Sign in to your dashboard</font></text>
</view>
<view layout="axis:y; spacing:4" x="10" y="10" width="200">
<view layout="axis:x" align="right">
<text x="14" y="20">User Name:</text>
<edittext id="username" width="200" x="40" y="20"></edittext>
</view>
<view layout="axis:x" align="right">
<text x="14" y="20">Password:</text>
<edittext id="passid" width="200" x="40" y="20" password="true"></edittext>
</view>
<view layout="axis:x" x="50">
<button name="submit">Submit
<method event="onclick">
var usern = username.text;
var passwd = passid.text;
debug.write("Username"+ usern);
debug.write("Password"+ passwd);
canvas.connection.login(usern, passwd);
</method>
</button>
</view>
</view>
</view>
My problem is in the code below: when I want to capture the username I use username.text and it returns the username that was entered into the field. When I use passid.text to retrieve the password I get a blank.
Anyone know how I can capture the password as shown below?
Code:----------------------------------------------
<view name="loginView" x="70" y="35" width="${ parent.width }">
<view>
<text x="2" y="2" width="200" height="35">
<font size="11">Sign in to your dashboard</font></text>
</view>
<view layout="axis:y; spacing:4" x="10" y="10" width="200">
<view layout="axis:x" align="right">
<text x="14" y="20">User Name:</text>
<edittext id="username" width="200" x="40" y="20"></edittext>
</view>
<view layout="axis:x" align="right">
<text x="14" y="20">Password:</text>
<edittext id="passid" width="200" x="40" y="20" password="true"></edittext>
</view>
<view layout="axis:x" x="50">
<button name="submit">Submit
<method event="onclick">
var usern = username.text;
var passwd = passid.text;
debug.write("Username"+ usern);
debug.write("Password"+ passwd);
canvas.connection.login(usern, passwd);
</method>
</button>
</view>
</view>
</view>