I want to show a simple animated (loading) icon when a user pressed on the submit button/submitted the form. A PHP script is then executed and processes some data until it returns a status message.

However, the PHP script is not executed when I put my JavaScript in the submit button tag:

PHP Code:
<form enctype="multipart/form-data" method="POST" action="action_upload.php">


input name="submit" onClick="showDiv('loadingDiv'); return false;" type="image" src="button.gif"
My script in the action tag of the form is then not executed, although showing the loading icon works. When I take out the onClick event handler, the PHP script is called, but why does the onClick handler prevent the PHP script in the action attribute from being called/processed?

can anyone help me out here pls?? thx!!