prevent form from automatically re-submitting on page load
- by user323774
I am using jQuery to point a form's target to an iframe on .submit(). This is to upload a file. It works fine, but when the page reloads, and the iframe is appended to the DOM, the iframe automatically resubmits the form, causing the same file to be sent to the server on each page load.
If I do not include the iframe in the HTML markup, or do not append it to the DOM, this doesn't happen, but of course, I need the iFrame.
So my question is, how can i prevent this?
:)
Andrew