javascript - Parent's Reference to Child Window Breaks upon Child Form Submit -


i have application containing javascript view model controlling it.

the application launches new window (window.open()) , assigns 'click' event listeners buttons in new window. new window contains form, when submitted, causes "unload" event on window, , breaking access parent window.

how can parent's reference new window persist or reinstate, when window 'unloads' , form submits?

you can not keep reference. if trying access kind of values may cookies or local storage.

you can try reinstate reference attaching event listener "unload" event. when event occurs close current "parent" window, , make "submit" script point parent window. once opened can re-open child window there.

update

cross-window javascript messy subject. advise taking first approach if it's applicable.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -