Re: Simultaneous error messages and Autocomplete
Re: Simultaneous error messages and Autocomplete
- Subject: Re: Simultaneous error messages and Autocomplete
- From: Nathan Dumar <email@hidden>
- Date: Wed, 10 Nov 2004 15:41:02 -0500
Jeremy,
Your version is fine, but if you want to combine them ...
// assuming username and password are String
if ( username.equals("") || password.equals("") ) {
combinedErrorString = "Both the name and password fields are
required.";
return null;
}
If you make your text field a password field, browsers should not
auto-fill the password. AFAIK.
Take care,
Nathan
On Nov 10, 2004, at 3:21 PM, Jeremy Matthews wrote:
With my login page, I use these to test login and password field input
(via strings declared as "" initially):
---------------------------
//test values
if ((_username == null) || (_username.length() == 0)) {
idErrorString = "Please enter an ID!";
return context().page();
}
if ((_password == null) || (_password.length() == 0)) {
passwordErrorString = "Please enter a password";
return context().page();
}
---------------------------
(Thanks to David, Nathan, Kieran, and the rest here...)
Is there a quick way to combine them so it will activate the
appropriate error message when either field is empty? As you can see,
it's going test by test, which isn't great when BOTH fields are empty.
I was using conditionals, but it seemed a bit heavy-handed for this
quick run.
Also, I can't seem to get the AUTOCOMPLETE=OFF tag to work for fields
or forms when desirable. Any examples? Maybe I'm missing something?
Thanks,
Jeremy
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
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