|
-
Dec 20th, 2005, 11:25 AM
#1
Thread Starter
Hyperactive Member
A field.focus();
Hi,
I have an ASP page with around 55 input fields.
For most of them I do a quick validation (javascript) of value on submit event of the form.
If there is an error I do a " form.myfield.focus(); "
It correctly focuses the wanted field, BUT under the field I have an error message explaining what is wrong.
The problem is that if the submit event was triggered when the user was at the begginning of the form, the focus goes to the field which is of course lower, so the last viewable information on the browser will be my input field in error.
AND
Under the field is shown the error message and we can't see it.
-------
That only occurs when the submit event is launched when the user is at the begginning of the form, because if he is at the end, the focused field will show at the top of the browser and I will see the error message underneath.
-------
Is it possible when using " .focus(); " to have the focused field always displayed at the top of the browser ?
Hi hope it is clear enough.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|