tags:

views:

35

answers:

4

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
+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
+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
good point with the onload!
RobertPitt
i did say jquery please
Martin Ongtangco
$("#fraFrame").load(function (){ // do something once the iframe is loaded});chck now, mark it as answer ;) :D
ehmad11
A: 

Assuming you have just one iframe...

$("iframe").load(function() {
  alert("Changed!");
  alert(frames[0].document.body.innerHTML);
});
Josh Stodola