html - Browser on submit with jquery -


When I submit a form, I show a blocking message "Please wait" with the following code: < Pre> $ (document) .ready (function () {$ ('form'). Submit (function () {$ .blockUI ({Message: "

This works fine for me.

If the user now presses F5, the browser asks to deposit again. Users are allowed

Chris

P> Edit: The form of the form goes to the same address as the form. I only differ on the controlling side between GET and POST. If this was a post, then I process the data received, otherwise I only show blank form. Users are allowed to send data twice or twice as often as they want, after the first post, the user can press F5 to resubmit the data, and it is completely allowed. It's just that waiting message does not appear any more. So maybe I need another general solution "On Post" Is there something like that?

solution:

  $ (document) .ready (function () {$ ('form'). Submit (function () {$ .blockUI ({Message: "

and the request.method server side is set and either 'GET' or 'POST' So, I know where the user came from.

It looks like I have the right S I do not even have the precaution. Only the first F5 event

  & script; script type = "text / javascript" & gt; $ (function () {$ (window) ) .keydown (function (e) {if (e.keycode == 116) {submitform (); return return;} alert (e.keyCode);})}}} submit the function () {alerts ("hello" );} & Lt; / script> & lt; form id = "myform" action = 'test.php' & gt; & Lt; Input id = "submit" type = "submit" onclick = "submitform (); return return;" /> & Lt; / Form & gt;    

Comments