Hi, Im using form_name.textbox.focus() and it working fine in IE but not in mozilla. Can someone tell me how to handle this? this for answering.
+3
A:
You're using a non-standard IE behavior that turns all elements with IDs into global variables.
Since Firefox does not do this, form_name
is undefined
.
Change it to
document.getElementById("ID of <input> element").focus();
SLaks
2010-05-10 12:21:41
thanks dude. it works perfectly
Selom
2010-05-10 12:27:52
Why was this downvoted?
SLaks
2010-05-10 13:53:57
+1
A:
Give these a go:
document.form_name.textbox.focus()
document.form_name[ "textbox" ].focus()
Salman A
2010-05-10 12:22:21