[Javascript] onLoad Focus
John Cross
jocross at symantec.com
Thu Apr 1 13:43:11 CST 2004
Thank you, Flavio, I appreciate the suggestion.
John Cross
Enterprise Licensing Product Manager
Symantec, Santa Monica
jocross at symantec.com
Yahoo Messenger ID: surfrjohn
310-449-8552 office
310-717-6830 cell
"Flavio Gomes" <flavio at economisa.com.br>
Sent by: javascript-bounces at LaTech.edu
04/01/2004 04:16 PM
Please respond to
"[JavaScript List]" <javascript at LaTech.edu>
To
"[JavaScript List]" <javascript at LaTech.edu>
cc
Subject
Re: [Javascript] onLoad Focus
At the end of your page:
<script>
document.body.onLoad = document.form.inputField.focus();
</script>
----- Original Message -----
From: John Cross
To: javascript at LaTech.edu
Sent: Thursday, April 01, 2004 3:51 PM
Subject: [Javascript] onLoad Focus
Hi All,
I am writing a web page where I build a list of submitted values, but as
my list grows my input field gets pushed off the bottom of the visible
page. So I want to use the focus function to put the cursor in my input
field when the page loads, so that by doing this the page will scroll to
where my form is located. So I've done this by using an onLoad function
that focuses the cursor in my form field, but I'm gettign an error that my
form field is not defined when the page loads. This is caused, I believe,
because my onLoad code is located in an include that gets loaded into the
top of the page before the form (lower in the page) loads.
How can I make the page wait to focus the cursor until my form is loaded?
Thanks!!!
- John
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040401/78763692/attachment.htm>
More information about the Javascript
mailing list