Unable to execute javascript loaded from external html page

user1390504

I am trying to execute 3 javascript commands on the page http://ringvaart.toervolger.nl/nl/tour_2/livepagina/?mode=default by loading it into my own div, but I fail to execute the commands. The commands

toggleAllSelected();
setActiveTeamId(64);
toggleSelectedTeamId(40);

are able to execute on the original page, but they are not defined in my own javascript and I therefore am not able to execute them.

Can anyone please help me out?

By the way, due to contraints executing them on the original page is not an 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>

obuliraj

Technically, it is not possible to access inline page of different domain. But if your page and embedded page are in same domain (ringvaart.toervolger.nl), then it is possible. Load the page in iframe

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

Then get to the contentWindow of the iframe to access the global variables

document.getElementById('inlinePage').contentWindow

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cannot execute javascript code from loaded page

From Dev

Fetch an html element from external page with javascript

From Dev

Unable to manipulate DOM of external page elements loaded by AJAX load()

From Dev

Unable to execute external python script from django

From Dev

Unable to execute functions from external scripts in Meteor

From Dev

javascript script block in html page works in header but not from external file

From Dev

How to echo javascript into current html page from external php file

From Dev

Why is JavaScript of the HTML from page2 loaded into page1 not working?

From Dev

How to automatically execute a javascript function from an external js file on page load with a specific condition

From Dev

How to automatically execute a javascript function from an external js file on page load with a specific condition

From Dev

Add HTML/JS code to external web page after it has loaded

From Dev

html/javascript page that files can be loaded to

From Dev

Unable to retrieve JSON data from url in html page using javascript

From Dev

Execute javascript when all videos on page have been fully loaded

From Dev

external javascript and loaded file

From Dev

How to get dynamically loaded HTML tags with specific class from the page using JavaScript?

From Dev

How to get dynamically loaded HTML tags with specific class from the page using JavaScript?

From Dev

HTML content loaded via AJAX loads external JavaScript out of order

From Dev

Javascript to print div inside external html page

From Dev

Replace text from jquery loaded external html file

From Dev

replace characters in html string which is loaded from external in for loop

From Dev

How do I execute Javascript only after a deferred Javascript external file has loaded?

From Dev

Execute External commands Fitnesse/DBFit from within a Test page

From Dev

Run a javascript when an element has loaded into the HTML page

From Dev

javascript called but not loaded on page

From Dev

javascript - unable to replace the html page with images

From Dev

Get Array value from JSP page to external JavaScript page

From Dev

Prevent Html Agility Pack from changing loaded page source

From Dev

Prevent Html Agility Pack from changing loaded page source

Related Related

  1. 1

    Cannot execute javascript code from loaded page

  2. 2

    Fetch an html element from external page with javascript

  3. 3

    Unable to manipulate DOM of external page elements loaded by AJAX load()

  4. 4

    Unable to execute external python script from django

  5. 5

    Unable to execute functions from external scripts in Meteor

  6. 6

    javascript script block in html page works in header but not from external file

  7. 7

    How to echo javascript into current html page from external php file

  8. 8

    Why is JavaScript of the HTML from page2 loaded into page1 not working?

  9. 9

    How to automatically execute a javascript function from an external js file on page load with a specific condition

  10. 10

    How to automatically execute a javascript function from an external js file on page load with a specific condition

  11. 11

    Add HTML/JS code to external web page after it has loaded

  12. 12

    html/javascript page that files can be loaded to

  13. 13

    Unable to retrieve JSON data from url in html page using javascript

  14. 14

    Execute javascript when all videos on page have been fully loaded

  15. 15

    external javascript and loaded file

  16. 16

    How to get dynamically loaded HTML tags with specific class from the page using JavaScript?

  17. 17

    How to get dynamically loaded HTML tags with specific class from the page using JavaScript?

  18. 18

    HTML content loaded via AJAX loads external JavaScript out of order

  19. 19

    Javascript to print div inside external html page

  20. 20

    Replace text from jquery loaded external html file

  21. 21

    replace characters in html string which is loaded from external in for loop

  22. 22

    How do I execute Javascript only after a deferred Javascript external file has loaded?

  23. 23

    Execute External commands Fitnesse/DBFit from within a Test page

  24. 24

    Run a javascript when an element has loaded into the HTML page

  25. 25

    javascript called but not loaded on page

  26. 26

    javascript - unable to replace the html page with images

  27. 27

    Get Array value from JSP page to external JavaScript page

  28. 28

    Prevent Html Agility Pack from changing loaded page source

  29. 29

    Prevent Html Agility Pack from changing loaded page source

HotTag

Archive