Closing A Window After Opening One

I have a question about a javascript code that should be simple.

  1. (HTML PAGE), I have on a page where it says the requirements needed to view the flash site. There is a text button that says ‘Launch Site’, now whats the code that I have to put in it, then when it does launch the site, it closes the requirements page?

if you new page is a popup, you should never close the index page
[edit] java and javascript are 2 very different languages[/edit]

Yea you’re right. I mean javascript, whatever. Yes, my new page is a popup. And exactly why should I not close the index? Maybe cause if the people close the new window by accident?? Is that what you’re saying?

yup, what if they close the window and can’t get back to your site

Don’t you want to keep it open but replace it with another, so that when the user closes the pop-up the chance is given to open it again (from the other page). But anyways.

In the <**head> section, place:


<**SCRIPT language="Java**Script">
function openclose()
{
 your_window = window.open("http://ww**w.whatever.com/pagetoopen.html","yourwindow","status=0,width=500,height=200");
self.opener = null;
self.close();
}
<**/SCRIPT>

And use this for the link:


<**a href="java**script:openclose()"**>Launch<**/a>