Hello.
I have a two-framed window in which JavaScript in the right-hand frame
spawns a child window, like this:
function openEditWindow( id)
{
var url = "http://db2/acct/presentation/editCurrency.ph p?rowToEdit=" + id;
var newWindow = window.open(url , "child", "HEIGHT=200,WID TH=600");
}
Simple enough. That page contains a form.
When the user submits the form, it is directed to a PHP script that does
various work. It (the PHP script) then redirects the window to a URL
containing this document:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaS cript">
function reloadAndClose( )
{
opener.location .reload();
window.close();
}
</SCRIPT>
</HEAD>
<BODY onLoad="reloadA ndClose()">
<H1>Succeeded .</H1>
</BODY>
</HTML>
While window.close() works, opener.location .reload() does not. I get an
error referring to that line and saying "Permission Denied." This is in the
JavaScript error window.
I am running this in Internet Explorer 6.
Any advice on what I'm doing wrong? Does the PHP redirection void
window.opener?
Thanks.
Best,
Dave
I have a two-framed window in which JavaScript in the right-hand frame
spawns a child window, like this:
function openEditWindow( id)
{
var url = "http://db2/acct/presentation/editCurrency.ph p?rowToEdit=" + id;
var newWindow = window.open(url , "child", "HEIGHT=200,WID TH=600");
}
Simple enough. That page contains a form.
When the user submits the form, it is directed to a PHP script that does
various work. It (the PHP script) then redirects the window to a URL
containing this document:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaS cript">
function reloadAndClose( )
{
opener.location .reload();
window.close();
}
</SCRIPT>
</HEAD>
<BODY onLoad="reloadA ndClose()">
<H1>Succeeded .</H1>
</BODY>
</HTML>
While window.close() works, opener.location .reload() does not. I get an
error referring to that line and saying "Permission Denied." This is in the
JavaScript error window.
I am running this in Internet Explorer 6.
Any advice on what I'm doing wrong? Does the PHP redirection void
window.opener?
Thanks.
Best,
Dave
Comment