I have a form that trigger onsubmit a java script function like the following
<form:form commandName="achievment" method="post" id="achievmentForm" enctype="multipart/form-data" onsubmit="disableButtons(this);" cssClass="validatable">
<input id="button1" type="submit" class="button" name="add" onclick="bCancel=false" value="إضافة" />
</form:form>
and the js code is
<script type="text/javascript">
<!--
function disableButtons(form){
if(jQuery(form).valid()){
jQuery('input:button').removeClass('button');
jQuery('input:button').addClass('grayButton');
jQuery('input:submit').removeClass('button');
jQuery('input:submit').addClass('grayButton');
jQuery('input:reset').removeClass('button');
jQuery('input:reset').addClass('grayButton');
jQuery('input:submit').attr('disabled', true);
}
}
-->
</script>
as you have seen i'm trying to disable the submit buttons in the page while waiting the response .. but what is happen is the browser gives me a 404 error but with the same url i have... it's really strange cause it happen only when i trying to disable the submit not any other type...