I've got a little problem with the "close pop-up" code I got out of the pop-up generator. I've got some javascript code on a HTML page for this purpose which was in place before I ran across this site. On my main page, the buttons work perfectly to open and place the pop-up exactly where I wanted them.
I wanted to take this thing one step further and have the buttons close an open pop-up before making another pop-up selection. To do this, I modified my swf so that the button would redirect to a frame in the same scene where the "Get URL" resides. After opening the first pop up, I had it set so that the button was loaded with the close window command, followed by a redirect to another frame in the movie with a "Get URL" ActionScript for a different pop-up.
Problem is, when I tested this out it didn't close the existing pop-up - it just left it opened, minimized it and set it down on the task bar, still running. The new pop-up shows up right on cue, so that's no problem.
The JS I'm using in the page is as follows:
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
NewWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>
Do I need to modify that, or add a separate script for closing? I'm pretty new to both Flash and JS, so please bear with me.
Thanks, Mike