Is this possible?
+1
A:
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?
Darin Dimitrov
2010-08-23 07:50:25
+1
A:
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.
IgalSt
2010-08-23 08:25:45
+1
A:
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
});
ehmad11
2010-08-23 08:33:33
good point with the onload!
RobertPitt
2010-08-23 08:36:08
i did say jquery please
Martin Ongtangco
2010-08-23 08:53:03
$("#fraFrame").load(function (){ // do something once the iframe is loaded});chck now, mark it as answer ;) :D
ehmad11
2010-08-23 08:59:16
A:
Assuming you have just one iframe...
$("iframe").load(function() {
alert("Changed!");
alert(frames[0].document.body.innerHTML);
});
Josh Stodola
2010-08-23 08:38:44