I want to track what happens inside an iframe when a user clicks on links in an IFrame. The page containing the iframe (parent) is designed to track the user's navigation through the page in the iframe. Both pages will be hosted on the same top-level domain, although the subdomains will be different.
I need the parent page to be notified of every click, but I do not have direct control over the pages that I load in the iframe.
Adds onclick to all links whenever a page loads in an iframe? How can i do this?
This will be the "template" on which to build:
<html>
<script language="javascript">
var currentURL;
</script>
<body>
<iframe id="container" width="500" height="500" src="http://subdomain.parentdomain.com"/>
</body>