View Full Version : window.open tracing - help required

Apr 10th, 2008, 08:09 PM
Hello everyone!
I was willing to make a script for my radio not to be realoaded each time user presses any link on the page. I thought I'll create it in popup window, but the site also has embedded radio, so I need it to be hidden or showed depending on that popup window, if it is active div tag will hold some text, if not it will hold that radio. Or to make a script which will popup that window only once through all time user browses my site. In any case I need somehow to trace that opened window, I don't know how to do it AFTER user presses any link and the page being updated. Script doesn't reallize anymore that window was already opened :( Any help will be appretiated!

Here's part of my script, on which I was working:

<script LANGUAGE='JavaScript'>
function openWindow() {
if (!window.window2) {
window2 = window.open('','windowRef','width=200,height=30,resizable=0,scrollbars=0');
window2.document.write("<object id='WinMedia' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject' height='50' width='323'>");
window2.document.write("<param name='FileName' value='http://server2.digital-webstream.de:10780'>");
window2.document.write("<param name='AutoStart' value='true'>");
window2.document.write("<param name='ShowControls' value='true'>");
window2.document.write("<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='http://server2.digital-webstream.de:10780' name='MediaPlayer' autostart='1' showcontrols='1' height='50' width='323'>");


<a href="#" onClick="openWindow()" />Popitup</a>
<div id="holder"><!--here will also be script for the radio and it will dinamically be showed or hidden
depending on that if window is opened or not--></div>

Apr 12th, 2008, 03:08 PM
Well this has nothing to do with Framewoks so you posted it in the wrong section.

Once the parent page navigates away from the page that opens the pop up window, the variable is destroyed. There is no way for it to reference the pop up window. In the old days people used to use frames to do this type of thing.

I personally hate music on a site unless it is a site I goto to listen to music.


Apr 12th, 2008, 06:33 PM
Sorry for posting in wrong section, but I rather confused with this sections and with frames you haven't opened America for me, yup I was thinking of this but I'd have to change a hell of files to make them in frames currently the site made in dinamic tables. And yup the site is about music :] anyway, I heard all I need to know...I'll have to make it with php sessions I think then. Thanks for help :] good luck