I have a form with some hidden fields, and I programmatically submit it, with its action set to a URL which is an endpoint on a different domain. The form's target is set to an iFrame. The content returned is loaded into my target. I know the method is quite old but it works.
I am wondering how I can handle 404 of the action URL. (like when the server is down). I'd like show something on the screen instead of 404.
Had it been an ajax call, it could just have success and failure handlers. I know there's no such thing for plain old form submit. But I can be missing something.
Any help or suggestion would be appreciated.