I have a window that might possibly generate a child popUp window. If one or more postbacks after a popup window was generated certain things change on the parent window, I want to refresh the data on the popup window. I have no way of knowing if the popup window was ever created or if it is still open. Below is some sample code.
var popupWindow;
function OpenPopup() {
popupWindow = window.open("Popup.aspx", "pop", opts);
popupWindow.focus();
}
A reference to the new Window is assigned to the popupWindow variable during the rendering of the page, but after one or more postbacks, the popupWindow variable is null and no longer points to the existing popup window. I can get the reference back by running the following code.
popupWindow = window.open("", "pop");
popupWindow .document.Form1.submit()
This works great if the popup window exists. But if it does not then it just generates a new blank window which is bad. My goal is to refresh the popup window if it exists but to do nothing if it does not exist already. Is it possible to know if a window named "pop" exists without actually opening a new window if it does not exist?
welcome to my lab:
=====================
http://home.arcor.de/athens/expexc/js/window/check_if_window_exists/