I have a grails application which parses a CSV file. I have it working with a form, and when people upload the form it can take 30 seconds plus to get the next page during which time only an astute or extra nerdy observer will notice the page is "waiting for response from.."
Is there a quick way to put some kind of pop-up or hourglass or something with javascript (maybe jQuery) while not changing the mechanics of the form? I am looking for a quick fix WITHOUT migrating the entire submission of the form to JQuery or something.
In my initial attempts the answer seems to be no. When the normal form submit is clicked the browser seems to chuck the page disabling the javascript. However, if the response is the SAME PAGE the javascript will execute then, but that doesn't help me.
Something like this:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">jQuery(function(){
alert("jquery aint buggeed"); //this happens
$("#submitHandle4JQ").click(function(){alert("BE PATIENT!!");}) //this does not
}); </script>
...
<form action="/path/mySweetGrailsController/parseStuff" method="post" enctype="multipart/form-data" >
<input type="hidden" name="longNumber" value="935762708000464097" id="longNumber" />
<input type="file" name="bigFile" />
<input type="submit" text="Upload My File" name="submitHandle4JQ"/><br/>
</form>