Hey,
I got a <html:form> tag that includes <html:text> in my
struts web-based app. When I load this page, I got the following JavaScript error message: "document.forms.statusForm.elements is null or not an object".
I've realized the problem is the focus attribute in <html:form> tag, cause once I take it off, everything works fine.
<html:form action="AlterarStatus.do" focus="siglaStatus">
...
<html:text property="siglaStatus" styleClass="FIELD" size="30" />
...
</html:form>
Follows the script generated by the struts tags in my
JSP (generated only if the focus attribute is set):
<script language="JavaScript" type="text/javascript">
<!--
if (document.forms["statusForm"].elements["siglaStatus"].type != "hidden")
document.forms["statusForm"].elements["siglaStatus"].focus()
// -->
</script>
Anybody can see what is wrong?
Tks!