We help IT Professionals succeed at work.

struts form auto submit

1,045 Views
Last Modified: 2013-11-24
hi everyone,

i have a question regarding struts form handling. i am new to struts. I have a jsp that uses the struts <html:submit> tags. Is there any way that i can get this part to work automatically. In other words the form automatically submits when the page loads. is there like an onLoad function.

the example codes for that portion of the jsp is like this :-

<html:><bean:message key="main.button.submit" bundle="<%=com.xxx.constant.Constants.RESOURCE%>"/></html:submit>&nbsp;
<html:reset><bean:messagekey="main.button.reset"bundle="<=com.orisoft.constant.Constants.RESOURCE%>"/></html:reset>&nbsp;
<input type="button" name="back" value="<bean:message key="main.button.back" bundle="<%=com.orisoft.constant.Constants.RESOURCE%>"/>"
                  onLoad="location.href='<%=myHome%>'">

thanks.
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
Force accepted

AnnieMod
Cleanup Admin

Commented:
Force accepted

AnnieMod
Cleanup Admin
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.