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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to