Re: [PHP] Default field

2009-03-19 Thread tedd

At 4:58 PM -0400 3/18/09, Bastien Koert wrote:

On Wed, Mar 18, 2009 at 4:18 PM, Paul M Foster pa...@quillandmouse.comwrote:


 Slightly OT, but here's the question. Normally when a form paints, the
 cursor isn't in any particular field. If you want to have the cursor
 show up in a particular field, how do you do that? I knew at one time
 and now can't find how it's done.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




body onload=fieldname.focus();
--

Bastien


That will work if javascript is turned on.

If not, I vaguely remember setting TABINDEX=1.

Cheers,

tedd



--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Default field

2009-03-18 Thread Bastien Koert
On Wed, Mar 18, 2009 at 4:18 PM, Paul M Foster pa...@quillandmouse.comwrote:

 Slightly OT, but here's the question. Normally when a form paints, the
 cursor isn't in any particular field. If you want to have the cursor
 show up in a particular field, how do you do that? I knew at one time
 and now can't find how it's done.

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



body onload=fieldname.focus();
-- 

Bastien

Cat, the other other white meat