Solved

Cursor in Form

Posted on 1998-11-15
4
135 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
Comment Utility
<SCRIPT LANGUAGE="JavaScript">
<!--
document.forms[0].elements[0].focus();
// -->
</SCRIPT>

Martin
0
 

Author Comment

by:Lee5
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, works good
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: blockā€¦
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now