?
Solved

Cursor in Form

Posted on 1998-11-15
4
Medium Priority
?
142 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…
Suggested Courses

752 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