Reputation: 23515
Is this possible?
Upvotes: 2
Views: 1049
Reputation: 2623
yh this works:
1_
<iframe src ="page.html" name="fraFrame" id="fraFrame" onLoad="alert('url changed!!!');">
<p>Your browser does not support iframes :P</p>
</iframe>
2_ using DOM reference or jquery thing:
$("#fraFrame").load(function (){
// do something once the iframe is loaded
});
Upvotes: 2
Reputation: 82483
Assuming you have just one iframe...
$("iframe").load(function() {
alert("Changed!");
alert(frames[0].document.body.innerHTML);
});
Upvotes: 3
Reputation: 1984
I'm not sure if this will work, but I would try to do it: You can try and bind a "load" event to the iframe. Once the URL has changed the iframe should fire the load event as the page has been reloaded.
Upvotes: 1
Reputation: 1038800
You may take a look at the window.setInterval
function. Also instead of constantly polling can't you be notified by the javascript code that changes the src
property for this change?
Upvotes: 1