Solved

Cursor in Form

Posted on 1998-11-15
4
139 Views
Last Modified: 2010-04-09
In an html form, how can I make the curser automatically go to the first form field.
0
Comment
Question by:Lee5
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
martinag earned 50 total points
ID: 1839703
<SCRIPT LANGUAGE="JavaScript">
<!--
document.forms[0].elements[0].focus();
// -->
</SCRIPT>

Martin
0
 

Author Comment

by:Lee5
ID: 1839704
Where do I put this script?  I put it every place I could think of and it didn't work.  Is there a space after //?
0
 
LVL 4

Expert Comment

by:martinag
ID: 1839705
Put it just after your form.

Yes, there is a space, but it doesn't matter if you have one or not.
To be sure to get everything right, you can use copy&paste to get it into Notepad. Then remove the leading spaces.

Martin
0
 

Author Comment

by:Lee5
ID: 1839706
Thanks, works good
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question