When I run the following jsp to automaticcally refresh every 10 seconds i'm geting javascript error that object is null on line document.refreshForm.submit(). can you please help on sloving the issue. I double checked the stuts file and action and form path has been defined.
Bear, RefreshForm is deifned in the struts file of the action path(refresh.do) and form bean <form bean name ="refreshForm" path="presentation.form.RefreshForm">
The form name is defined in sturts config file of that particluar action which is refresh.do
Even if i declare the form name as myform when i call the jsp page it gives me an error that document.myForm is not an object or is null. How can i resolve this.
In order for the reference document.refreshForm to resolve to an actual element, there has to be a form element with that name defined on the page. Until there is, you are going to continue to get the error.
What are you trying to accomplish by submitting a form that does not exist on the page?
bujji makani
Greenhorn
Joined: Jan 10, 2006
Posts: 4
posted
0
Bear,
I defined on the form page as follows: <html:form name ="refreshForm" action="/refresh.do" method="post" type ="presentation.form.RefreshForm">
This does not work so I created a hidden element but did not work either. <input type="hidden" name="refreshForm" value="count" />
I want to submit the form to the server to get new values from database. how can i submit this form from jsp page to the server without using submit buttons.