0

I'm trying to integrate two web systems. Lets call them sys1 and sys2. Sys1 has a button, this button opens a lightbox in which I display an iframe of sys2. Sys2 has a form that will do a post to sys1. When I in sys2 hits submit and the data from sys2 is recieved in sys1, I would like to close my lightbox and handle the data. I have the posibility to modify both systems. Sys1 is written i PHP.

bytecode77
  • 14,163
  • 30
  • 110
  • 141
gubbfett
  • 2,157
  • 6
  • 32
  • 54
  • Take a look at [this question](http://stackoverflow.com/questions/2161388/calling-a-parent-window-function-from-an-iframe). Another approach: open a new window instead of an opener and use [javascript window.open().opener](http://www.w3schools.com/jsref/prop_win_opener.asp) – Tanuel Mategi Oct 21 '15 at 18:49
  • The systems are on different domains which makes parent invalid. And, unfortunately, the sys2 must be in an iframe. :( – gubbfett Oct 21 '15 at 19:05
  • you can try ` – Tanuel Mategi Oct 21 '15 at 19:08
  • not really sure what you mean @TanuelMategi, in the my_function i would add some kind of listener for the iframe url change...? and how would i fetch the data? – gubbfett Oct 21 '15 at 19:20
  • i'm afraid this is too much to write and doesnt fullfill the intent of stackoverflow. but let me try to give you a brief description: _onload_ will fire the event when the url gets changed. then, since you have access to both systems, your outer system (Sys1, not the iframe) will send an ajax request to the server which will then get the data you processed in the inner system (sys2). – Tanuel Mategi Oct 21 '15 at 20:45

0 Answers0