I\'ve seen ways of seeing if a window a particular script opened is still opened, but what if it didn\'t?
I have a small window that has a button to click to load th
Use try{} and catch(err){}.
try{ window.opener.document.body.getElementById('#elementId'); // do some action with window. opener } catch(err){ // if we are here then probably there is no window.opener window.close(); // closing this window or whatever you want }