Hi, I'm trying to perform some basic javascript validation using a form with the simple theme.
I just added the onsubmit parameter in the form tag: <s:form .... onsubmit="return validate();"> but the form is ALWAYS posted, so there might be an error somewhere. Looking at the html source code, the form.ftl template generates <form ... on submit="return validate(); return true;"> so this is why it is always posting the form data. I just changed the form.ftl template file from: <#if (parameters.validate?default(false) == false)><#rt/> <#if parameters.onsubmit?exists><#rt/> ${tag.addParameter('onsubmit', "${parameters.onsubmit}; return true;") } <#else> ${tag.addParameter('onsubmit', "return true;") } </#if> </#if> to: <#if (parameters.validate?default(false) == false)><#rt/> <#if parameters.onsubmit?exists><#rt/> ${tag.addParameter('onsubmit', "${parameters.onsubmit};") } <#else> ${tag.addParameter('onsubmit', "return true;") } </#if> </#if> My question is: Am I using the either the simple template or the form tag incorrectly? Or it is just a bug in the template? BTW, isn't it this lines just doing nothing?: <#else> ${tag.addParameter('onsubmit', "return true;") } </#if> Gabriel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]