Suppose in your index.html file that you open another window (without toolbars) as the main window for your site, and then naturally you want to close the first window (index.html) since its purpose is only to open your main window.

When I call self.close() from index.html, I get a prompt from IE saying that the window is trying to close itself. Is there a way to avoid this or do I have to keep that first window open?

Here's the script

<script type="text/javascript">
window.open("main.php", "wdoMain", "resizable, scrollbars, status");
self.close();
</script>