how to give a focus to a text field in the form?

Hi!
This is my problem. I want to give a focus to the input text field in the form.
I've written  an event handler to the "onLoad" event of the document containing my form
like:
function DoOnLoad() {
  self.document.myform.inputbox1.focus;
}
and in the body of the form there is a string like:
<input type="text" name="inputbox1">

but that all does'nt work : in IE 30 the first text field is always focused and
in NN 30 no of fields are bocused at all.

What I did wrong?

Thanks in advance.
LVL 3
abb1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sybeConnect With a Mentor Commented:
function DoOnLoad() {
 document.myform.inputbox1.focus();
}

you forgot the "()" after focus
0
All Courses

From novice to tech pro — start learning today.