Solved

placing cursor in a form

Posted on 2002-03-22
2
132 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 100 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

696 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