Solved

Cursor in Form

Posted on 1998-11-15
4
138 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

823 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