0

I have a dashboard page.. and a loadfile() function in its dashboard.js file. I have an iframe in the dashboard which is addsite.html with addsite.js file..

I need to call loadfile() from addsite.js..

Ninoop p george
  • 678
  • 5
  • 22
  • http://stackoverflow.com/questions/2161388/calling-a-parent-window-function-from-an-iframe – BenG Nov 13 '15 at 09:37

1 Answers1

0

Import dashboard.js in addsite.html, and then call it's loadfile() method.

For example:

<script src="dashboard.js"></script>
<script src="addsite.js"></script>

<!-- ... more markup ... -->

Now, in addsite.js, you can access dashboard.js' functions.

weirdpanda
  • 2,521
  • 1
  • 20
  • 31