Java Mailing List Archive

http://www.junlu.com/

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

help : submit with javascript problem

sachin

2004-10-09

Replies:

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)

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