faqts : Computers : Internet : Web : HTML : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 11 people (9%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

How can I make the cursor automaticly go to a single line textarea on load?

May 11th, 2004 07:07
jsWalter, jon swift, Eirik Kronlof,


here's an easier way, below your form put this script
[removed Norton Security block - jsWalter]
<script language="JavaScript">
<!--
document.form_name.element_name.focus();
//-->
</script>
A friend of mine solved this... Here's how it goes:
<head>
<script language="Javascript">
function cursorToTextfield()
  {
  document.formi.form_name.focus();
  }
</script>
</head>
<body>
This probably could go in the Javascript section but oh well