Hi,
I've got a music player on my site that launches in a new window. I don't want to display the "launch music" link if the window is already open and playing. This problem is driving me nuts... Here is where I'm up to:
<script type='text/javascript'>
if(!new_win) {
var new_win;
}
function variable_in_link(mem_id)
{
var new_win = window.open('}
if(!new_win) {
// display my "open music player" link
}
The music player link is displayed all the time. Any ideas why I'm not detecting that the window is open?
I've tried:
if (new_win == "" || new_win.closed || new_win.name == undefined)
But I just get an error saying that new_win is a null object...
Any help would be really appreciated.
Many thanks
John ;-)
</script>
I don't make mistakes, I'm merely beta-testing life.
I've got a music player on my site that launches in a new window. I don't want to display the "launch music" link if the window is already open and playing. This problem is driving me nuts... Here is where I'm up to:
<script type='text/javascript'>
if(!new_win) {
var new_win;
}
function variable_in_link(mem_id)
{
var new_win = window.open('}
if(!new_win) {
// display my "open music player" link
}
The music player link is displayed all the time. Any ideas why I'm not detecting that the window is open?
I've tried:
if (new_win == "" || new_win.closed || new_win.name == undefined)
But I just get an error saying that new_win is a null object...
Any help would be really appreciated.
Many thanks
John ;-)
</script>
I don't make mistakes, I'm merely beta-testing life.