Retrieving References To Child Window If The Parent Refreshes
I have a page (parent.html) which has many links which on clicking opens a window as: winRef = window.open(url, '_blank', 'width=800,height=600,resizable,scrollbars'); To give a w
Solution 1:
As you've already figured out, variables do not exist outside running processes. Thus you can't save them in e.g. cookies.
The obvious approach would be to keep track of window names:
var windowObjectReference = window.open(strUrl, strWindowName[, strWindowFeatures]);
Those are strings so can be stored anywhere. However, some browsers (namely Chrome) open tabs in independent threads, which means that once you close the parent window, child ones become unreachable.
I think you could try to do it the other way round:
- Assign a unique ID to each child window
- Store IDs (local storage, cookies, whatever)
- Make each child window poll by ID until they receive a job for them
Post a Comment for "Retrieving References To Child Window If The Parent Refreshes"