Remove iframe before load page
How do I remove an iframe before a page loads?
On my website I have users fill out a surveymonkey survey in an iframe.
Upon completion of the survey, surveymonkey redirects to a page in my
website domain. This new page is still trapped within the iframe; I want
the iframe removed before this new page is loaded. I tried the following
code, but this removes both the iframe AND the content of this new page I
want loaded, producing a blank screen:
<html>
<head>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$('iframe', parent.document).remove();
});
</script>
</head>
</html>
<?php
//the content for the page I want loaded
?>
Any suggestions?
No comments:
Post a Comment