Hello,
I’m trying through a form to display a loading gif when pressed the submit button.
I’ve found on the net this code, but something is wrong.
If a keep the [B]id=”form33″
If I delete [B]id=”form33″
[CODE]<script type=”text/javascript”>
function EnvoiMessage() {
$(this).submit();
document.getElementById(‘form33’).innerHTML = ‘<img src=”img/loading.gif” alt=”Loading…” />’;
}
</script>
[CODE]<form id=”form33″ action=”ping2.php” method=”post”>
<p>
<input type=”hidden” id=”router_ip” name=”router_ip” value=”<?php echo $donnees[‘router_ip’]; ?>” />
<input type=”submit” name=”submit” id=”submit” onclick=”EnvoiMessage()” value=”Ping”/>
</p>
</form>
what’s wrong with this javascript code?
How can I display a loading gif during the loading of the page?
Thanks for your help