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="/https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.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