[Javascript] onLoad Focus

John Cross jocross at symantec.com
Thu Apr 1 12:51:37 CST 2004


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040401/63cf2187/attachment.htm>


More information about the Javascript mailing list