I have this if statement in a form
where validate() is a javascript function that submits the form.
however, this is not working, i used a submit type button instead of the validate function and it worked, but i need the submission to be done in the javascript function and not as a submit button.
any suggestion??
thanks in advance.
Code:
<cfif #URL.Type# IS "Edit"> <input type="button" value="Edit message" onClick="validate()" name="Edit"> <cfelseif #URL.Type# IS "Delete"> <input type="submit" value="Delete message" name="Delete"> </cfif>
Code:
<script type="text/javascript">
function validate(){
document.form.submit();
}
</script>
any suggestion??
thanks in advance.
Comment