saribe / eModal

Easy Modal for bootstrap, is a simple way to create modal dialogs using javascript.
http://saribe.github.io/eModal
271 stars 97 forks source link

Accessing iframe data #39

Closed gigbuilder closed 7 years ago

gigbuilder commented 8 years ago

I'm building a modal FORM using an iframe and a separate form html on my site. I can load it without any problem BUT when I create a SAVE button (on the primary html page) to a function I cannot seem to get access to the form fields in the iframe. I've even hacked the code a bit to add an ID to the iframe but still have no luck getting a handle on the iframe html document object. Any suggestions?

malkafly commented 8 years ago

i made by using $("#parentInput", parent.document.body).val('valor');

and for close parent.eModal.close();

saribe commented 8 years ago

unless you are on the same domain or allow cross-domain-request, you may not be able to access to the iFrame DOM.

Had you try the eModal.ajax() ?