html:text box focus setting using javascript

Hi all,pls help me with setting the focus on a html:text box using a javascript function where i have validated the value of that text box. document.formName.textName.focus () is not working .Thanks in advance
[238 byte] By [GuruSeethaa] at [2007-11-27 9:14:42]
# 1
post your full code or that part ,
drvijayy2k2a at 2007-7-12 22:03:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
document.getElementById("textName").focus();
skp71a at 2007-7-12 22:03:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...