Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Java Script to close window???????????????

I have 2 web pages adminIndex.jsp and regTypeQuery.html. I have a button on adminIndex.jsp. When I click the button on adminIndex.jsp I want the following to happen.

The window containing adminIndex.jsp must close and simultaneously the page regTypeQuery.html must open.

For this purpose I have tried the following 2 javascript functions and their variants.

function popupload1(form1)

{

mywindow=window.open("./regTypeQuery.html","mywindow","width=200,height=170");

mywindow.moveTo(200,300);

window.close("./adminIndex.jsp");

return true;

}

function popupload1()

{clw=window.self;

mywindow=window.open("./regTypeQuery.html","mywindow","width=200,height=170");

mywindow.moveTo(200,300);

clw.close()

}

Problem is regTypeQuery.html opens fine. But adminIndex.jsp doesn't close. Can any javascript expert suggest me the correct code? Don't say me that javascript can't close JSP pages.

At another place of the application I have opened JSP pages with javascript. So closing must be possible

Update:

My OS is Fedora and browser is Firefox. I'm experienced Unix user.

3 Answers

Relevance
  • Anonymous
    1 decade ago
    Favourite answer

    The Mozilla DOM does not allow you to close windows that were not opened by a script.

    http://developer.mozilla.org/en/docs/DOM:window.cl...

  • 1 decade ago

    I'm by no means a Jscript guru.

    However, the last time I tried to close a window, the IE security stuff kicked in, prompting users with the nasty "An app is trying to close this window" message.

  • 5 years ago

    you will desire to delete all historic previous of the plug ins out of your computer and then acquire them from the internet returned....yet study heavily while setting up to confirm it works which includes your computer `HEATHER

Still have questions? Get answers by asking now.