I want to know if it’s possible to cancel a post after posting a form to an IFrame.
$form = jQuery("<form target='iframetarget' method=post><files...></form>");
$form.submit();
I need $form.cancelPost(); or something like that to cancel that request.
In short, No, not in general – you probably want to ask why you need to cancel the upload. If all you want is to maybe stop the bandwidth consumption (cause its taking too long), then as @Diodeus suggested, removing the frame from the dom may work.
If you want to stop the result of the upload (e.g. publishing something) you’ll need to also implement something server side to undo the effects of the post to handle the case when the data has already reached the server. e.g. have a hidden requestID in the form, and a undoRequestAction script server side which you call (with your requestID) in addition to removing the iFrame from the DOM…