I have a submit button inside a form, which sends an action to another function file. In this file funcoes.php will execute a function and will return to the current page. While performing this function, after clicking refresh, I would like to insert an animated gif in the center of the page to say that it is loading. How would you do this?
Follow form:
<form name="cdi" method="post" action="funcoes/funcoes.php" >
<h4><i class="fa fa-angle-right"> </i> Indicador CDI <h6> - Atualizado em <?= $dt_atualizacao ?></h6></h4>
<button type="submit" class="btn btn-theme" name="cdi">Atualizar</button>
</form>