Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: help : submit with javascript problem

Erik Weber

2004-10-09

Replies:

Sorry, I'm not very good with JavaScript, but could it be that your
function needs a return value? All my JavaScript functions return true
or false, and it seems like I had a problem with a submit function
similar to yours until I put in a return statement.

Erik




sachin wrote:

>hello all ,
>
>i have a struts form and a button outside the form.
>on button click , with javascript i need the submit the form
>
>any help is welcome.
>
>My code is like following. but does not work
>
><html:form action="/something.do">
> ....
></html:form>
>
><input type="button" onClick="javascript:callSubmit()">
>
><script>
>function callSubmit() {
> document.forms[0].submit();
>}
></script>
>
>Sachin Hegde
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@(protected)
>For additional commands, e-mail: user-help@(protected)
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.