|
Posted by freemont on March 19, 2009, 4:10 pm
Please log in for more thread options On Thu, 19 Mar 2009 13:17:02 +0000, T.J. writ:
show/hide quoted text
>> T.J. wrote:
>>> I have a page with an input form
>>> Is there a way of having the cursor
>>> automatically positioned in the imput box when the page is opened?
>> Yes. Ever noticed that this is what happens with google? Why don't you
>> go over to their site and have a look at how they do it?
> Thanks, so it is basically adapt
> <body onload="document.f.q.focus();"> to suit my form?
Yes.
show/hide quoted text
<body onload="document.form.name.focus()">
<form name="form" action="script.php" method="post">
<input type="text" name="name" id="name" value="" size="30"
show/hide quoted text
maxlength="50">
Tells the browser to look in the "document" for the element named "form"
for the element named "name" and set focus() in it.
--
"Because all you of Earth are idiots!"
show/hide quoted text
¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
|
> Is there a way of having the cursor
> automatically positioned in the imput box
> when the page is opened?