I want to clear a web page using Javascript or PHP.
However, I believe one area of the page is a: data-form="manual iframe"
So when I try to "clear" the page, it only clears the data in that iframe. The rest of the content is still there.
Does anyone know how to clear ALL the content on the page, not just what is in the iframe?
My overall objective is to clear all of the content from the current webpage, and then redirect the user to a totally different web page (the home page).
Here is my code so far (in PHP):
// An attempt using javascript (didn't work, only cleared info in iframe)
echo "<script language=\"javascript\">
var body = document.getElementById('body');
body.innerHTML ='';
var divrow1 = document.getElementByClassName('row');
divrow1.innerHTML ='';
</script>
";
// Another attempt using PHP (didn't work only cleared content in iframe)
document.write ("");
//This is where I want page to redirect to:
header("Location: http://www.challengehut.com/index.php");
exit;
If you want to see the whole thing, it starts here: Click here: http://challengehut.com/TheChallenges/ (then hit the submit buttons). After the "Suggestions" section, I want it to redirect the user to the Home page of the website.