Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force user through form from top 2 bottom?

Status
Not open for further replies.

arneweise77

Programmer
Apr 25, 2002
46
SE
Hi everyone!

I have this form which has to be filled in from the top to the bottom to get the right values and entrys. I want it this way just to keep the user away from making type errors. I´m setting focus to the first textbox, but how do I force the user to enter information before moving on to the next textbox?

I´m using validators aswell, so the user can see if his entry made an error, but then I want him to remain in that textbox and not be able to move on.

Please help me with this, anyone.
Thanx in advance, Arne
 
Add the following tag to your text box:
onBlur="checkVal(this);"

and the following function to your page:
<script language=javascript>
function checkVal(obj){
if (obj.value == '')
obj.focus();
}
</script>

:)
paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top