I have a form that my users fill out on their cell phones, after the user hits the submit button, i have a spinning wheel that pops up so that the user doesnt hit the submit button again.
Unfortunately if their cell phone has a weak signal, the spinning wheel doesnt appear and the user hits the submit button again. This results in two forms being submitted.
If i hide the button on click, wouldnt i have the same program? The real issue is that the request is still being processed because of the weak signal when the user hits the submit button right? What other solutions are there?
#divLoading
{
display : none;
}
#divLoading.show
{
display : block;
position : fixed;
z-index: 100;
background-image : url('spinner.gif');
background-color:#666;
opacity : 0.4;
background-repeat : no-repeat;
background-position : center;
left : 0;
bottom : 0;
right : 0;
top : 0;
}
<script>
$(document).ready(function(){
$("#saveandsubmitbutton").click(function(){
$("div#divLoading").addClass('show');
});
});
</script>