Friday, January 21, 2011

How to solve No animation on GIF file if submit a form in html?

Solution: Need to load gif file just before submit by JavaScript/JQuery

<input type="button" class="button" id="process" name="cmdFinish" value="Confirm" />
<div id="processinfo" style="display: none">

<script type= "text/javascript">
$("#process").click(function() {
document.getElementById('processinfo').innerHTML = '<img src= "images/load.gif" /> <br/>Processing...';
$("#processinfo").show();
$("form:first").submit();
});
</script>

No comments:

Post a Comment