Submit into a iframe-popup
Hi everybody,
I'm using jquery mobile pop-up with an iframe inside. In my case the content of the iframe could do none, one or more page submit. The problem is that when I try to close the popup without doing a iframe content submit, everything goes ok, but when I do a submit into the iframe and then I call popup close, the content of the opener goes into iframe.
Seems like if iframe content loses information about his parent.
Here is the code...
Opening button:
- <input value="Open popup" data-theme="b" type="button" onclick="myOpenPopup();" />
- <a href="#mobilePopup" id="_MOBILEPOPUP" style="display:none;" data-position-to="window" data-inline="true" data-rel="popup"></a>
Function called on open:
- $("#mobilePopup").empty().append($("<iframe width=\"100%\" height=\"100%\" style=\"border: 0px; margin: 0px; padding: 0px;\"></iframe>").attr("src",urlNoCache(myURL)));
- $("#mobilePopup").css("width", winW-100).css("height", winH-100);
- $("#_MOBILEPOPUP").click();
Div on the page:
- <div data-role="popup" id="mobilePopup" data-overlay-theme="a" data-theme="d" class="ui-content"></div>
Closing function:
- parent.$("#mobilePopup").popup("close");
Hope that it's well explained...