0

As shown at diagram, how can I execute sample function in the x application?

http://imageshack.com/a/img834/52/xvso.png

mb21
  • 34,845
  • 8
  • 116
  • 142
leprax
  • 3
  • 1

1 Answers1

0

Homework? See invoking-javascript-code-in-an-iframe-from-the-parent-page.

In your case:

document.getElementById('test-iframe').contentWindow.sample(args);
Community
  • 1
  • 1
mb21
  • 34,845
  • 8
  • 116
  • 142
  • not homework. yes window.parent work butI am getting browser error. "SecurityError: Blocked a frame with origin "http://10.0.0.97:8082" from accessing a cross-origin frame." – leprax May 28 '14 at 13:06
  • if you can, serve both from the same domain. see http://stackoverflow.com/questions/19837354/chrome-blocks-different-origin-requests – mb21 May 28 '14 at 13:21