You could use the onsubmit of the form tag as well...

<html:form name="delForm" action="/DeleteForm" onsubmit="return delete()">
--------
--------
-------
<html:submit value="Delete"/> </html:form>


HTH
Nitesh
----- Original Message ----- From: "Khan" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Thursday, June 23, 2005 10:30 AM
Subject: regarding javascript problem


Hi,
I have problem in submiting my form through javascript by onclick event, it say that this property cant be supported. The form gets submitted by <html:submit> button, no prob. Any idea how to proceed but through javascript only.
My code:
<script language="javascript">
function delete(){
if(condition){
checking some validations
} document.delForm.submit(); // from here i want to submit the form
}
</script>
<html:form name="delForm" action="/DeleteForm">
--------
--------
-------
<html:button value="Delete" onclick="Javascript:delete();">
<!-- <html:submit value="Delete"/> -->
</html:form>
Thanks in advance
Regards
Khan
<user@struts.apache.org>


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

Reply via email to