Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Struts
Validator
Janice Guevara
Greenhorn
Posts: 14
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
How can I set the focus on a form field after it has been validated??? (assuming there is an error).I'm working with
struts
.
Any ideas?
Thanks...
Merrill Higginson
Ranch Hand
Posts: 4864
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The following code would work. "onlode" below should be "onload", but I had to substitute to get around the JavaRanch Filter.
<head> <title>My Page</title> <script> function init() { <logic:messagesPresent property="userName" > document.getElementsByName('userName')[0].focus(); </logic:messagesPresent> } </script> </head> <body onlode="init()"> ... rest of the page ...
[ October 19, 2006: Message edited by: Merrill Higginson ]
Merrill
Consultant,
Sima Solutions
What's that smell? Hey, sniff this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Is return message depiction valid UML notations ?
NoClassDefFoundError - ValidateEventListener
java.io.Serializable;
use case
SCJA Certification expiration ?
More...