Re: (Still Newbie) WO Programmatic equivalent to JS select focus
Re: (Still Newbie) WO Programmatic equivalent to JS select focus
- Subject: Re: (Still Newbie) WO Programmatic equivalent to JS select focus
- From: Jerry Porter <email@hidden>
- Date: Tue, 14 Sep 2004 09:03:23 -0600
Hi there,
Try something like this:
<html>
<head>
<meta name="generator" content="HTML Tidy for Mac OS X (vers 1st
May 2003), see www.w3.org">
<title>Test page</title>
</head>
<body>
Test Page
<table border="1" cellpadding="1" cellspacing="1" summary="Login
Panel Table">
<tr>
<td align="center">
<webobject name="loginPanelForm">
<table>
<tr valign="middle">
<td align="right">
Login ID:
</td>
<td align="left">
<webobject name="loginField"></webobject>
</td>
</tr>
<tr valign="middle">
<td align="right">
User ID:
</td>
<td align="left">
<webobject name="userField"></webobject>
</td>
</tr>
<tr valign="middle">
<td align="right">
Password:
</td>
<td align="left">
<webobject name="passwordField"></webobject>
</td>
</tr>
</table><br>
<webobject name="loginButton"></webobject>
</td>
</tr>
</table><br>
<webobject name="focusScript"></webobject>
</body>
</html>
focusScript: WOJavaScript {
hideInComment = true;
scriptString = "document.LoginPanel.LoginId.focus();";
type = "text/javascript";
}
loginButton: WOSubmitButton {
action = submit;
value = "Login";
name = "Login";
class = "button";
}
loginField: WOTextField {
value = loginLoginId;
name = "LoginId";
}
loginPanelForm: WOForm {
multipleSubmit = true;
name = "LoginPanel";
action = buttonSubmit;
}
passwordField: WOPasswordField {
value = loginPassword;
name = "PasswordField";
onChange = "handleLogin();";
}
userField: WOTextField {
value = loginUser;
name = "LoginUser";
}
On Sep 14, 2004, at 6:04 AM, Erwin wrote:
Even searching archives or reading the 4 books I bought on WO
I could not find how to focus to a specific WOTextField in a WOForm
and select the data in this WOTextField....
I don't want to use JS but I would like to do it from my
validationFailedWithException method....
is it possible ?
thanks for your help
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
Jerry E. Porter
Software Engineer
Wireless Matrix Corporation
102, 1530 - 27th Ave. NE
Calgary, Alberta, Canada
T2E 7S6
Main: 1-403-250-3949
Fax: 1-403-250-8163
email@hidden
http://www.wirelessmatrixcorp.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden