Hi. I have added an iframe to a F7 page. I want to open a page in app when a user click button in the iframe. I tried foloowing code but it dosen’t work. How can I do?
Because I realized payment process in an iframe. when the payment process finish, a result message and an “OK” button appears in the iframe. If user clicks OK button, I want open app’s home page without iframe.
var url='https://framework7.io/kitchen-sink/core/';
var iframe=Dom7('<iframe src="'+url+'" width="400" height="400"></iframe>');
Dom7('.page-content').prepend(iframe);
now, wait for iframe to be load
and type this:
var code="parent.app.views.current.router.navigate('/about/')";
Dom7(iframe[0].contentWindow.document).find('.page-content').attr('onclick',code);
now click on your iframe and the “parent” will load “about” page