Jump to content

How do I call event listeners in winB from win A


thesoundsmith

Recommended Posts

My DashRadio window works great, opening as a mini-applet and playing random songs from my site. When the viewer clicks on one of the many video or audio players in the main site, I need to test if the 'DashRadio' player is active, and stop playing if it is (java script:player.sendEvent('STOP').Simpler question, the rest I can do. I open an HTML page with an onclick from a menu.

<a class="radmenu" href="radio.htm" title="Play DashRadio" onclick="return popup(this, 'DashRadio')">DashRadio</a>

I assume this means I named the window 'DashRadio' What I can't find is how, from any other window on the site, to refer to the eventListeners in the DashRadio window. I need to issue a player stop event if another video/audio player is activated, without just closing the DashRadio window. I thought

onclick="java script:DashRadio.player.sendEvent('STOP'

would work, but does not appear to.The reference is at my site,, click the DashRadio menu button upper-left to see it in action, the page is the DashRadio window

Link to comment
Share on other sites

  • 2 weeks later...

If you open all links with the same window name then it's going to reuse the same window, so opening a new window should stop the other station when the window reloads. Are you seeing it open more than one window?You can also store a reference to a window and then access its DOM from there, e.g.:var new_win = window.open('page.html');new_win.custom_function();

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...