PDA

View Full Version : javascript:self.close() won't close chromeless window


thunderwatch
09-08-2002, 10:11 PM
I've successfully implemented the chromeless window at:

http://www.dynamicdrive.com/dynamicindex8/chromeless.htm.

But the window won't close with this in it:

<a href="#" onclick="javascript:self.close()">Close</a>

or this:

<a href="javascript:self.close()">Close</a>

It's not a problem in NS because NS doesn't create the chromeless window to begin with. You just get a regular window, and the regular one closes fine with either of the above. But in IE's chromeless window, the window just stays there.

Does anybody know why this is and what the remedy would be?

Thanks!

--Thunderwatch

thunderwatch
09-08-2002, 10:14 PM
P.S. I don't know why there are spaces between "java" and "script" in my example above. They're not there when I edit the thread. At any rate, it's not the cause of the malfunction :) .

--TW

Quiet Storm
09-08-2002, 10:28 PM
Chromeless (http://www.microbians.com/) windows are like FRAMEs, you'll need to call a close() to all of them:


<A HREF="javascript:top.close();" onClick="top.close();">
close window</A>

thunderwatch
09-08-2002, 10:43 PM
Works like a charm. Thank you so much!

--TW