I have a form created in HTML that posts to an external domain
<form method="post" action="someExternalDomain.com/submit">
I want to submit it with this (I can’t use JQuery because of the same-origin policy) but capture the response from the server using JQuery. How would I do this?
Thanks in advance.
You can’t post cross-domain without CORS, and jQuery can’t access the response unless it is done with
jQuery.ajaxor an iframe, both of which are limited by the same-origin policy.If you do wish to implement CORS, it also takes some other modifications to make it work in all versions of IE.