A jquery plugin for submitting forms via an iframe and then getting a response back via postMessage
If the response is a parseable json string it will be parsed into json, otherwise it will return the entire body as the response.
Example usage
// Example Response
<script src="proxy.php?url=https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.9.1%2Fjquery.min.js"></script> <script type="text/javascript"> $(function() { window.postMessage( $(document.body).html(), "http://localhost" );}) </script>
{payment: 'success'}$("form").iframeSubmit(function(response) { console.log("response", response); });
To run specs (Must have node package manager installed) npm install node app.js open the browser to http://localhost:8080/specRunner.html