For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > April 2004 > Re: [PHP-DB] Cursor in text box.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Cursor in text box.
John W. Holmes

2004-04-28, 12:33 am

matthew perry wrote:
> My users complain about everything. The most common is "Why do I have to
> move the mouse over to this box every time? Waaaah!"
> How do I get the cursor to que into the first input area of my form?


JavaScript, not PHP.

document.yourform.yourtextbox.focus(), I think.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
Justin Patrin

2004-04-28, 1:37 am

John W. Holmes wrote:

> matthew perry wrote:
>
>
>
> JavaScript, not PHP.
>
> document.yourform.yourtextbox.focus(), I think.
>


Here's a more cross-browser way:
document.forms["formName"].elements["elementName"].focus();

--
paperCrane <Justin Patrin>
Uzi Klein

2004-04-28, 1:37 am


----- Original Message -----
From: "matthew perry" <mwperry@mail.uh.edu>
To: <php-db@lists.php.net>
Sent: Wednesday, April 28, 2004 5:44 AM
Subject: [PHP-DB] Cursor in text box.


> My users complain about everything.
> The most common is "Why do I have to move the mouse over to this box
> every time? Waaaah!"
> How do I get the cursor to que into the first input area of my form?
>
> -Matt


easiest way IMO is :

<body onload="document.formname.inputname.focus()">

Hope it helps.

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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com