English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

2007-01-14 03:21:34 · 3 answers · asked by binaryFusion 5 in Computers & Internet Programming & Design

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

2007-01-14 03:34:34 · update #1

3 answers

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.close

2007-01-14 04:01:17 · answer #1 · answered by Anonymous · 0 0

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.

2007-01-14 03:25:19 · answer #2 · answered by geek49203 6 · 0 1

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

2016-10-19 23:23:28 · answer #3 · answered by rochart 4 · 0 0

fedest.com, questions and answers