[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

placing cursor in a form

Posted on 2002-03-22
2
Medium Priority
?
134 Views
Last Modified: 2010-04-09
Hey, not sure where this should be posted to but
here goes.  I have a page with a login form.  I have
noticed that when you go to some webpages, the developer
has done something that puts the site visitor's cursor
in the first field of the form, saving us the trouble of
having to tab to or click in the form field.  you can
just start typing.

I would like to do this in my form.  Is this a javascript
thing?  HTML?  Can someone tell me how this is done?

tia
0
Comment
Question by:altarEgo
[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 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 400 total points
ID: 6889498
<BODY onLoad='document.nameOfYourForm.nameOfYourField.focus();'>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889508

<BODY onLoad='document.myform.mytext1.focus();'>

<FORM name='myform'>
 <INPUT type='text' name='mytext1' value=''><BR>
 <INPUT type='text' name='mytext2' value=''><BR>
 <INPUT type='text' name='mytext3' value=''><BR>
</FORM>
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…

650 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