I apologize if the answer is posted elsewhere. I have a function.
function RPop() {
window.open('/live365', 'live365', ',width=400,height=550,resizable=yes,scrollbars=no,menubar=no');
$("div").remove(".radio1");
return true;
}
This function works as intended. The div goes poof and a pop up window opens when a user clicks a link. The pop up window and the div both have radio players so If someone refreshes the page, the removed div shows back up again. I figure the simplest solution is to check to see if the window named live365 is open and if it is, then remove the div automatically. The problem is that everyone keeps writing out these complex functions that check this and do that when all I really need is something to check if the window is open or exists. I can figure out how to do the rest. I know the following is programmatically incorrect but I'm thinking along these lines.
$(document).ready(function () {
if window.live365 = open; {
$("div").remove(".radio1");
}
};
I think that SHOULD work or something close to it. I also considered setting a cookie, or using the HTML5 session thing. Ultimately, I've seen several sights use media players that will pop out into a window and I'm attempting to duplicate that effort in my own way.