jquery - Unable to execute javascript loaded from external html page -


i trying execute 3 javascript commands on page http://ringvaart.toervolger.nl/nl/tour_2/livepagina/?mode=default loading own div, fail execute commands. commands

toggleallselected(); setactiveteamid(64); toggleselectedteamid(40); 

are able execute on original page, not defined in own javascript , therefore not able execute them.

can please me out?

by way, due contraints executing them on original page not option.

kind regards!

<html> <body> <div id="ringvaart"></div>  </body> <script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>  <script type="text/javascript"> $(document).ready(function() {     $("#ringvaart").html( "<object data='http://ringvaart.toervolger.nl/nl/tour_2/livepagina/?mode=default' style='width:100%; padding:0px; margin:0px; height:100%;'/>").ready(         function(){             toggleallselected();             setactiveteamid(64);             toggleselectedteamid(40);         }     );  }); </script>  <style > #ringvaart{     width: 1920px; }  body{     margin:0px;     padding:0px; }  </style> 

technically, not possible access inline page of different domain. if page , embedded page in same domain (ringvaart.toervolger.nl), possible. load page in iframe

<iframe id="inlinepage" src="http://ringvaart.toervolger.nl/nl/tour_2/livepagina/?mode=default"></iframe>

then contentwindow of iframe access global variables

document.getelementbyid('inlinepage').contentwindow


Comments