Examples of solutions I have provided to problems that people have said are impossible to solve...
The following is the first ever flash movie that does binary processing on the client side: Binary processing in Flash.
It was first released to the flash community in late 2001.
Attention: this solution is IE only. A cross-browser solution is left as an exercise to the reader
Click to see it work:
<script language="JScript">
var win;
function setup(){
win = window.open();
//You can execute the script on the window from the opener thus
win.execScript("window.onunload = function(){opener.detectWin();}", "JScript");
//or have the script embedded in the page that the window.open() call points to
}
function detectWin(){
//setTimeout is required, because while the call stack of the window
//is not exhausted the window is still considered open
setTimeout("alert('this will be true because the setTimeout() call is " +
"executed on a new stack " +
"and therefore the child window call stack gets exhausted, " +
"the window is subsequently closed and this fact is verified " +
"by this: win.closed = ' + win.closed);", 0);
alert("This returns false because the child window js call stack is not " +
"exhausted and it has to before it can close (check your taskbar and " +
"see that the window is still there) win.closed = " + win.closed);
}
</script>