J
Joel
Hi there,
My original window (A) opens a modal dialog window (B).
In B, you fill out a form and submit it to itself for
processing. When B reloads, it knows that is successfully
processed the form and it suppose to close itself after
returning "1" or "0" to A.
My problem is that B will never close. When I submit it,
it kind of opens a new window and close that one before
return to itself (B).
Here is a code sample:
A
---
function newEntry(){
var sReturn=window.showModalDialog('b.asp');
alert(sReturn);
}
B
---
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim bSave
bSave=Request.QueryString("save")
if bSave="1" then
'process
end if
%>
....
function init(bSave){
if(bSave=='1'){
window.returnValue=bSave;
window.close();
}
}
....
<body onLoad="init('<% Response.Write(bSave)%>');">
.....
<form id="b" name="b" action="?save=1" method="post"
target="_self">
....
Any idea ?
My original window (A) opens a modal dialog window (B).
In B, you fill out a form and submit it to itself for
processing. When B reloads, it knows that is successfully
processed the form and it suppose to close itself after
returning "1" or "0" to A.
My problem is that B will never close. When I submit it,
it kind of opens a new window and close that one before
return to itself (B).
Here is a code sample:
A
---
function newEntry(){
var sReturn=window.showModalDialog('b.asp');
alert(sReturn);
}
B
---
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim bSave
bSave=Request.QueryString("save")
if bSave="1" then
'process
end if
%>
....
function init(bSave){
if(bSave=='1'){
window.returnValue=bSave;
window.close();
}
}
....
<body onLoad="init('<% Response.Write(bSave)%>');">
.....
<form id="b" name="b" action="?save=1" method="post"
target="_self">
....
Any idea ?