Simultaneous error messages and Autocomplete
Simultaneous error messages and Autocomplete
- Subject: Simultaneous error messages and Autocomplete
- From: Jeremy Matthews <email@hidden>
- Date: Wed, 10 Nov 2004 15:21:19 -0500
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
_______________________________________________
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