December 17, 2003
Microsoft - you're shit, and you know you are

Hmmm. A bit of rather nasty DHTML for you. See it here, or run it here.

Run this in Firebird, and all is well. Since your browser window wasn't opened by JavaScript, it can't be closed by JavaScript. (Note that the onbeforeunload event is an IE special, so the 'navigate away' link doesn't even try to call the doclose() function under Firebird.)

But under IE, it's different. Both the links execute the doclose() function. Which is fair enough. But, scarily, in both cases, your browser window ends up getting closed. Clearly, the assignment to the top.opener property has fooled IE into thinking that the window is a pop up, that that it's safe to close it. Yuck!

What I don't understand is: Why do you see the alert box more than once?

Tested with: Firebird 0.7 and IE 6.0 SP1.

Posted to JavaScript by Simon Brunning at December 17, 2003 02:54 PM
Comments

We have a little song we like to sing up here in Redmond.

If you're **** and you know it, clap your hands.
If you're **** and you know it, clap your hands.
If you're **** and you know it, then your life should surely show it.
If you're **** and you know it, clap your hands.

Posted by: Bill Gates on December 17, 2003 04:28 PM

Thanks for that, Bill. (Cough-wanker-cough.)

Posted by: Simon Brunning on December 17, 2003 05:23 PM

Particularly nasty, as I have mozilla set as my default browser, yet use sharpreader to read blogs, it uses ie's engine. I meant to open your link in a new window,(mozilla) yet i opened it within sharpreaders preview pane, which then closed. Took a complete restart of sharpreader to get the preview pane back.

Posted by: chris clark on December 18, 2003 04:45 PM

Sorry, Chris. :-(

Posted by: Simon Brunning on December 18, 2003 04:48 PM

bill gates is sh*t and microsoft r shit cuz dey sed dat da xbox360 wud b out for christmas in uk and it woz but dey r so stupid dey only put 60000 of dem in the uk so wot im tryin 2 say is dat bill gates and microsoft r shit!!!!!!!

Posted by: jon on December 20, 2005 03:15 PM

Microsoft are indeed shit, but not nearly as shit as anyone that 'ritz lik jon cuz itz kin cool. dey fink dey av a rite t dis ene1 da fik cuntz'

Thank you for your enlightening post, jon.
Fuck off and donate your computer to charity you prick.

Posted by: jonny on November 4, 2007 02:22 PM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?