Hello everyone,
I am trying to show an animated spinwheel image when I am making a servlet call, and hiding it, once the call comes back in my JS method.
The following code displays the image alright, but fails to hide it, once the call comes back.
JSP
<div id="spin" class="modal" style="display: none">
<div class="center">
<img alt="" src="../Images/spin.gif" />
</div>
</div>
JS
$("#btnSubmit").click(function(e) {
document.getElementById('spin').style.display="block";
callToServlet();
document.getElementById('spin').style.display="hidden";
// ... do something else
});
Any suggestion as where I am going wrong, please?