That is, to open a window called player that displays the file player.html, you can use code like this (not in player.html itself, but rather in the page the user is coming from):
The window opens when the user clicks on the "Open The Player Window" link. You could call openWindow from other code, but keep in mind that web browser popup blockers - which pretty much everybody has these days - will just ignore it unless you are responding to a mouse click.
Then, in player.html, you can close the player window again with this code:
// Close the current window
When the user clicks on "Close This Player Window," the player window "self-destructs."
As long as that's the case, though, you can do it like this:
var top = window.open("", "_top");
The special window name _top always refers to the outermost parent window, even if you are deep inside a nested frame.
Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!