I am able to capture the user navigations from an external website opened in an IFrame into a variable and i am able to display the location in console. But i want to capture all the user navigations into an array or a text file. Please help me with this. Below is the code i have.
<html>
<head>
<title>test page</title>
</head>
<body>
<li><a href="http://mysmallwebpage.com/" target="iframe_a">Small Page</li>
<iframe id = "frame" src="" name="iframe_a" onload ="loadImage()" width = 100% height = 100% style="border:none;"></iframe>
</body>
<script>
function loadImage()
{
test = document.getElementById("frame").contentWindow.location;
console.log(test);
}
</script>
</html>
The variable "TEST" in the script is holding the navigation link. I just want to capture all the navigations in some array or file. Please test the code using console understand my request.