Tuesday, 15 April 2014

javascript - Quickest way to pass data to a popup window I created using window.open()? -


I have a window. There is a JavaScript code to open a popup window using the Open () function. I want to pass the data from that parent window to that popup window and I can not find an elegant or simple solution anywhere on Google or SO, but such a It seems that support must have been made in JS for this. What is the easiest way of data in a popup window?

Thank you in advance for all your help!

Due to security restrictions it is super easy only If the original window and popup are from the same domain then use this:

  // in one variable new_window = window.open ('http: //www.mydomain .com) in the 'Open' command. '); // Get NewWindow.my_special_setting = "Hello World" by using its variable;  

In the child (popup) window, you can access that variable in the following way:

  window.my_special_setting  

Did you want to do something special that wanted to last?


No comments:

Post a Comment