I have a strutsjsp and ActionForm for that jsp. The form validation is done in the action form.If there are any errors, those are displayed on the jsp. I want to get the focus on the first error field on the jsp.
Can anyone let me know how to do that?
posted 9 years ago
i dont know of any mechanism you could use...
guess you will need a scriptlet / js which parses the error map in the request / session and focuses the right field on the page if a appropriate error is found.
no rocket science, but you'll probably need a few hours to test and implement.
also note that "the first field" is something you can usually not decide automatically.
happy coding, jan [ January 19, 2007: Message edited by: Jan Groth ]