faqts : Computers : Programming : Languages : PHP : Not Quite PHP : Javascript

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

26 of 28 people (93%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Is there a way, either in javascript or php to have the curser automatically come up in the first text box on the page?

Nov 21st, 2000 10:49
Mike Boucher, Devorah Miriam Proven,


You can use javascript to do this pretty easily:
In the HEAD of your document place this JS:
function placeCursor() {
    document.myFormName.myFieldName.focus();
}
in the BODY tag, place  onLoad="placeCursor();"
Good Luck