Page 1 of 1

self.close();

Posted: Mon Jul 02, 2007 8:32 am
by shiznatix
I am opening a popup window with window.open() but I am trying to close the popup window with self.close after I submit a forum but for whatever god aweful reason it is not working.

I get this error:
Error: [Exception... "'JavaScript component does not have a method named: "isTabContentWindow"' when calling method: [nsIBrowserDOMWindow::isTabContentWindow]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "<unknown>" data: no]
I was looking this up but the only answer i got was to disable noscript, which I did, but that did nothing.

I am running firefox 2.0.0.4 on Vista

Posted: Mon Jul 02, 2007 8:41 am
by Gente
Maybe this will help

Code: Select all

  window.opener = self;
  window.close();

Posted: Mon Jul 02, 2007 9:01 am
by shiznatix
Gente wrote:Maybe this will help

Code: Select all

  window.opener = self;
  window.close();
Sounded good but it did not work, same error. This is the strangest thing.

Posted: Mon Jul 02, 2007 1:07 pm
by alex.barylski
window.close() didn't work?

Try dropping the window?

How and where are you calling window.close() inside a button's onclick or some external javascript?