Basically, I would like to accomplish form submit on reload.
So I have the following code:
$('form').submit(function() {
$(window).unbind("beforeunload");
});
$(window).bind("beforeunload", function() {
$('#disconnectform').submit();
});
Basically, I want the disconenctform only submitted on reload, not on submit. However, $('#disconnectform').submit() doesn’t seem to work form. Any ideas why? How can I achieve what I want?
On reload, the browser does not maintain session data. By consequence, when you hit refresh, the data in the form may not be saved. Most browsers will give you a “form resubmission” warning when this is attempted. Some browsers do not handle this situation at all.
This does not answer your question, because I believe that you need to re-think your design.
Good luck
-tjw