My site includes a parent-window that has a table of customers. By clicking on a customer, the user initiates the opening of a child-window that has a table of further data for that specific customer. Clicking on a customer in the parent-window runs the following code:
if(window.varwins["study"+tcustid] && !window.varwins["study"+tcustid].closed){
alert('A study for this customer, '+tcust+', is already open.');
}
else{
varwins["study"+tcustid]=window.open("crxindex.php?getcustid="+tcustid,tcustid);
}
This works very well. However, if there is a child-window open, and the parent-window is closed, when the parent-window is reopened there is no longer a connection between the 2 windows and the above code does not keep the child-window from being duplicated in a second child-window for the same customer.
Is there a way to connect the re-opened parent-window with the already-opened child-window, so that the above code keeps the child-window from being duplicated?
I think this all has to do with the same-origin policy, but I need to find a work-around.
Thanks.