I'd like to load a whole html page in a popup with the magnific popup plugin. If I try:
<a href='/page.html' class='btn' id="edit-images-btn">Edit images</a>
<script>
$('#edit-images-btn').magnificPopup({
type: 'ajax'
});
</script>
It produces this:
This is graphically quite what I want but the problem is that the content of <html></html>
is inserted directly into dom without being placed in a protective iframe. That can't be good. I'd like magnific popup to create an invisible iframe for the content. I get some weird js errors in console too:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed) http://maps.googleapis.com/maps/api/js?key=AIzaSyBW_Py3pNsiSifVJzqL8J28LFCQ6P1KaX0&sensor=false&libraries=places&_=1389102487002
Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8008' is therefore not allowed access. http://maps.googleapis.com/maps/api/js?key=AIzaSyBW_Py3pNsiSifVJzqL8J28LFCQ6P1KaX0&sensor=false&libraries=places&_=1389102487002
XMLHttpRequest cannot load http://maps.googleapis.com/maps/api/js?key=AIzaSyBW_Py3pNsiSifVJzqL8J28LFCQ6P1KaX0&sensor=false&libraries=places&_=1389102487002. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8008' is therefore not allowed access.
These errors are probably a consequence of the invalid html structure or maybe multiple inclusion of google maps api. Not sure. It probably will be solved by iframing the content.