i have on my website http://www.musi9a.com a flash mp3 player that opens in a popup. The user can then add songs to it by clicking on a link “add song”. When the popup is already open and the user is on the same page the if(popup) or if (popup && popup.open) works but when the user navigates to other pages if(popup) doesnt seem to work anymore. can you help me. You can test on my website choose an artist click on “launch top 30” or “launch all” then go to another artist. You will notice that you have to click twice to get it work (the playlist in the player will change). Any general improvements are also welcome.
when a user navigates through the website he just chooses other artists and add their songs to the playlist of the player. Please go to the website to see how it works.
Oh that’s all, good. I thought you may have been wanting to effect the browsing navigation of the web user in some nefarious and not to be spoken of manner.
I suggest a look at the documentation as it relates to opening windows.
Here is some good documentation for window.open which states:
If a window with the name strWindowName already exists, then, instead of opening a new window, strUrl is loaded into the existing window. In this case the return value of the method is the existing window and strWindowFeatures is ignored. Providing an empty string for strUrl is a way to get a reference to an open window by its name without changing the window’s location.