Hi, I was wondering what is the best way to detect when a page has finished loading where the page in question is in a different tab or window. And where page to be loaded could be any page on the web and is not under my control.
I am using Firefox only and I dont mind if the solution requires a firefox extension or greasemonkey script (I have already added the configuration/commands to allow access to pages from different domains).
The code below shows an attempt. It sometimes detects when the initial page has loaded but when I press 'submit' to reload a new page into the other window, it doesnt detect it.
Thanks.
<html>
<head>
<script type="text/javascript">
currentPageObj = window.open("http://www.bbc.co.uk", "currentPage");
currentPageObj.addEventListener("load", function(){alert("loaded")}, false);
</script>
</head>
<body>
<form action="http://www.example.com" target="currentPage">
<input type="submit">
</form>
</body>
</html>