RE: [PEAR] how to make (using javascript or otherwise) cursor go to username field in AUTH when page loads?

From: Date: Wed, 30 Mar 2005 15:03:30 +0000
Subject: RE: [PEAR] how to make (using javascript or otherwise) cursor go to username field in AUTH when page loads?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18414@lists.php.net to get a copy of this message
Hi, The following will do it for you: <script language="JavaScript"> <!-- Begin function toForm() { document.form1.username.focus(); } </script> Replace 'username' in the script with the field name of which you want to place the focus. Also, give the form a name: <form name="form1" ...> Cheers George > -----Original Message----- > From: l Burnerheimerton [mailto:lburnerheimerton@yahoo.com] > Sent: 30 March 2005 3:53 pm > To: pear-general@lists.php.net > Subject: [PEAR] how to make (using javascript or otherwise) cursor go to > username field in AUTH when page loads? > > > I am using AUTH and like it. I want to make it so > that when the page loads, the cursor is in the first > field. Now you have to click in that field. > > Thanks. > > function loginFunction() > { > ... > echo "<input type=\"text\" > name=\"logName\"><BR>"; > echo "<input type=\"pass\" name=\"pass\"><BR>"; > ... > } > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.general (#18414) next »