willogee
12-16-2005, 05:50 PM
Hi folks
I have a form on a page that stretches beyond boundaries of a div, so the user has to scroll across to complete all form elements (not great user interface design I know, but that's just how it is on this one).
I am using a validation toolkit that, after alerting an input error returns focus to the offending form element for the user to correct. If the offending element is out of view, I would like to be able to scroll automatically as the element receives focus from the validation tool.
So I would like to be able to set an event handler that can distinguish between focus obtained by the user (keyboard or mouse) and focus obtained by the validation tool.
I'm pretty new at event handlers, so don't even know if this sort of thing is possible. Any pointers in the right direction would be much appreciated.
Many thanks, Will
(my first post here, so go easy on me!)
I have a form on a page that stretches beyond boundaries of a div, so the user has to scroll across to complete all form elements (not great user interface design I know, but that's just how it is on this one).
I am using a validation toolkit that, after alerting an input error returns focus to the offending form element for the user to correct. If the offending element is out of view, I would like to be able to scroll automatically as the element receives focus from the validation tool.
So I would like to be able to set an event handler that can distinguish between focus obtained by the user (keyboard or mouse) and focus obtained by the validation tool.
I'm pretty new at event handlers, so don't even know if this sort of thing is possible. Any pointers in the right direction would be much appreciated.
Many thanks, Will
(my first post here, so go easy on me!)