javascript - How to detect if an iframe has moved from one URL to another -


i wondering if can me problem, have iframe url(on subdomain). page in iframe has button page. able resize iframe when user moves other page in iframe. below how sizing first page.

 $disp = '<div style="border: 0px solid rgb(201, 0, 1); overflow: hidden; margin: 50px auto; max-width: 300px;">  <iframe scrolling="no" src="https://something.com" style="border: 0px none; margin-right: 188px;height: 1036px; margin-top: -380px; width: 297px;"> </iframe>  </div>';  echo $disp; 

using onload can tell if iframe source changes, explained here:

iframe src change event detection?

the gist is

<iframe src="http://www.google.com/" onload="yourjsfunc();"></iframe> 

or, jquery

$('#iframeid').load(function() {     alert('frame has (re)loaded'); }); 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -