Hopefully someone can tell me how to do this. I have client side validation running in javascript. The function simply checks to see if the user entered an answer to each question on the page. If they did not answer one I would like to focus on that question. Here is my problem.

The page looks something like this:

<html>
<head></head>
<body>

1. What is your name?
<input name="full name" type="text">

2. What is your favorite color?
<input name="favcolor" type="text">

</body>
</html>

Within the validation function I can set focus to the 'fullname' input box or the 'favcolor' one, but I can't set focus to the question text. Setting focus to the input box will push the question text off of the top of the page and the user would have to scroll up to see what the question was again. Does this make sense?

Is there any way I could set anchor tags around the question text and then have the javascript focus on or jump to the anchor? If that can't be done, doesn anyone have another suggestion to accomplish what I am trying to do?

Thanks

Dennis