I'm trying to display an animated GIF while submitting a form. This works fine in Internet Explorer, but not in FireFox (3.0). Firefox only shows the animated GIF and never submits the form.

Here's my script:

<script language=javascript type="text/javascript">

function sendRequest(reqAction) {
document.CounselOptionForm.Action_Button.value = reqAction;

document.CounselOptionForm.submit();
return true;
}

function showBusy() {
document.getElementById("buttons").innerHTML = "<h3 class='blackheader'><center>Retrieving data...</b><br><img src='theme/bigrotation.gif'></center></h3>";
}
</script>


Here's my button:
<input type="image" name="SubmitButton" src="theme/submit.gif" align="center" border="0" onclick="disabled='true';showBusy();sendRequest('SubmitPressed');" onmouseover="this.src='theme/submitH.gif';" onmouseout="this.src='theme/submit.gif';">

Does IE process the two functions in my "onclick" handler differently than FireFox?
Any help or insight would be greatly appreciated.

Use a Firefox addon, Firebug, to debug your Javascript applications. Move the semicolon separated statements in the onclick handler of the INPUT element to a separate function for easier debugging.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.