RE: [PHP3] Setting focus on one input field...
| From: | Wizaerd | Date: | Mon, 05 Jun 2000 19:57:50 +0000 |
| Subject: | RE: [PHP3] Setting focus on one input field... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1088@lists.php.net to get a copy of this message | ||
it's not a PHP thing, but an HTML thing... in your <BODY> tag for the form
use the onLoad event whish sets the focus...
I.E.
<SCRIPT LANGUAGE="JavaScript">
function SetTheFocus()
{
document.frmObj.controlname.focus();
return true;
}
<SCRIPT>
<BODY onLoad="SetTheFocus();">
<FORM NAME="frmObj" METHOD="POST" ACTION="someurl.php">
<INPUT TYPE="text" NAME="controlname" VALUE="">
</FORM>
> -----Original Message-----
> From: Don Rainwater [mailto:Don.Rainwater@UC.Edu]
> Sent: Monday, June 05, 2000 12:45 PM
> To: php3@lists.php.net
> Subject: [PHP3] Setting focus on one input field...
>
>
> I may be showing my ignorance here, but I haven't seen how to do
> this in the
> [admittedly few] places I've looked: I have a php script that uses a few
> input fields, and I want to place the cursor in the first input
> field. How
> can I do this?
>
> Thanks in advance for any help.
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe@lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe@lists.php.net
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin@lists.php.net