jumping to a certain spot on a page

Results 1 to 2 of 2

Thread: jumping to a certain spot on a page

  1. #1
    Join Date
    Dec 1969
    Posts
    116

    Default jumping to a certain spot on a page

    Hi,<BR>I&#039m creating a form on an asp page. When the form is filled out I use javascript to check that all the fields have been filled in.<BR>what I would like to do when a field has not been filed in, is send the person to that field,<BR>Thanks for any suggestions on how to do this<BR>

  2. #2
    Nathen Grass Guest

    Default RE: jumping to a certain spot on a page

    Just use the focus method.<BR><BR>&#060;input type="text" id="testID" onblur="testing()"&#062;<BR><BR>&#060;script language="javascript"&#062;<BR>function testing(){<BR>&nbsp;&nbsp;&nbsp;if(testID.value==& #039&#039){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;alert(&#039Field Empty&#039);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;testID.focus();<BR>&nbsp;&nbsp;&nbsp;}<BR>}<BR>& #060;/script&#062;<BR><BR>focus() will set focus to the field in question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •