You can do it with JavaScript. Something like: <script language="JavaScript"> document.formname.fieldname.focus(); </script>
At the bottom of the page, replacing formname and fieldname with the appropriate values, obviously... HTH Richy ========================================== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -----Original Message----- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: 11 July 2002 16:26 To: [EMAIL PROTECTED] Subject: [PHP] How to set focus in a form field I have an annoying 'glitch' in the forms on my site: When a page loads, if it has a form on it, I would like the cursor to move to the first field, be 'set' - that is, I should see a cursor or blinking cursor in the first field. As it is now, on some pages, I either have to 'tab' to the first field, or click themouse in that field. Is there anyway to automate this, so that when a page loads it automatically goes to the first field, and 'highlights' the entry area? (Btw, I tried 'tabindex=1' but it still does not do what I'd like it to. Any ideas, suggestions, or admontions gratefully accepted. Tia, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php