Close browser window

is there a command that I can use to close the browser window as flash hits a certain frame?

getURL(“javaScript:window.close()”);

It olmost works, but now my browser gives a message :

"The webpage you are trying to watch is trying to close the window.
do you want to close the window ‘yes’ , ‘no’ "

Is there a way to avoid this?

not if it’s not a popup window.

exact, the main browser will always pop up this alert if you try to close it via script (security reasons)

Hey Eyez! Quoi de neuf en France? J’ai un peu le mal du pays ici… Ce qui me manque le plus, bizarrement, c’est un peu de pain et du camembert…

pom :*(

yep I will like 4th that it is just what happens with your browser there is nothing you can do about it I know it is very sad its ok dont cry. :*(

thats too bad, but thanks for the help y’all.

Greenhouse-
Not to worry I have the solution for you! I use it on my website http://cgonline.net

When you enter my website- a browser window opens that immediately launches a second browser window. This second browser window displays the website website in “Full Screen” mode. I then use this special script to close down the first browser window so when you exit the site you are not left with a “window behind a window”. This special script will close the window in IE5+ and NS4+ without a confirmation popup.

It has problems with AOL’s current browser. When executed to close the window it will actually close down the entire AOL program (it does not crash AOL, it closes AOL). My work around is a CGI program that detects the AOL browser and launches a different page.

I am going to eat dinner. When I am done I will post the script for you.

One question I have. Can anyone tell me how to post actual code without this forum converting it and making it invisible?

Here it is as promised. It was developed by Rahul Mahajan who did a great job.

IE5+
Place this in the body of your HTML page that points to your swf file (this is the key)-

<object id=closeWin type=“application/x-oleobject” classid=“clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11”> <param name=“Command” value=“Close”>
</object>

I am not absolutely sure of the command to use in your Flash file to execute the “close window” but is should look something like this-

“closeWin.Click();launchwin()”

Netscape 4+
Netscape only needs this to close a window

“javascript:self.close()”

The netscape command above may work in an AOL browser. I have not tested it. Good luck!

For some reason the link did not appear in my previous post-

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2844&lngWId=2

the man (Rahul) is a genius!