I built a HTML+JS app which I use for my own mystical reasons. This thing uses IFrame to display webpages in the middle of the application. I implemented a simple framekiller killer:
window.onbeforeunload = function(e){
e.preventDefault();
e.stopPropagation();
return false;
}
Which, generally, works fine. The problem is that some sites, upon form submission, desperately try to break out of the frame's constraint which is blocked by frame killer. As a side effect, I am unable to submit such forms without killing the app.
Is it somehow possible, to force the sites I display, to aim their form submission at the iframe, not the very top of the display tree?
All you need to do is access the form element you wish to change and set the forms target to point to your iframe. So for example
<script>
function changeToIframe() {
var tmp =document.getElementById('form_id_to_change');
tmp.setAttribute("target","my_iframe");
}
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With