Solved

Cursor in Form

Posted on 1998-11-15
4
140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

732 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