Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.
/ iframejs Public archive

A tool for submitting forms via an iframe and then getting a response back via postMessage

License

Notifications You must be signed in to change notification settings

turlockmike/iframejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iframejs

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="//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

About

A tool for submitting forms via an iframe and then getting a response back via postMessage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published