What I was looking to do was this: Open a new window (child) that displays data that are passed from the initial window (parent).
I was able to find solutions on how to read values out of textboxes between the parent window and the child, but that would not work for me. I need to be able to pass arrays of objects and other values that are too big or just won’t fit in a textbox.
Here is the solution I came up with:
In the parent window before you call window.open() to create a new browser window/tab you need to create a new property on the window object.
window.foo = arrOfObjects;
window.open( ‘newWindowToShow.html’, ” );
Now to access the new property in the child window, you just need to reference the window.opener object.
var myNewListOfObjects = window.opener.foo;
That’s it. Now in the your new (child) window/tab you will have access to you values.
Make sure that when you are done using the values in your new window that you set the values to null. I noticed some issue when I didn’t do that.
window.opener.foo = null;