我用JS的一个function来通过showModalDialog打开一个子窗口,并传相应的值过去了。
function JBAuditingClick(id)
{ var strUrl = "JPF1242AuditingEdit.aspx?type=4"+"&id="+id;
var bResult = window.showModalDialog(strUrl, "_blank", "dialogWidth:478px;dialogHeight:280px;status:0;center:1;scroll:0;help:0");
return(true);
}
然后在那个子窗口中,做相应的操作。接着,就想通过在这个子窗体中编写相应的代码来刷新父窗体。
但是,我用
Response.Write("<script language=javascript>window.parent.dialogArguments.document.execCommand('Refresh');window.close();</script>");
它就出现了window.parent.dialogArguments.document为空或不是对象。
所以,想请问,各位高手,能够给点提示。
function JBAuditingClick(id)
{ var strUrl = "JPF1242AuditingEdit.aspx?type=4"+"&id="+id;
var bResult = window.showModalDialog(strUrl, "_blank", "dialogWidth:478px;dialogHeight:280px;status:0;center:1;scroll:0;help:0");
return(true);
}
然后在那个子窗口中,做相应的操作。接着,就想通过在这个子窗体中编写相应的代码来刷新父窗体。
但是,我用
Response.Write("<script language=javascript>window.parent.dialogArguments.document.execCommand('Refresh');window.close();</script>");
它就出现了window.parent.dialogArguments.document为空或不是对象。
所以,想请问,各位高手,能够给点提示。
var bResult = window.showModalDialog(strUrl, "_blank", "dialogWidth:478px;dialogHeight:280px;status:0;center:1;scroll:0;help:0");
document.location.reload();
Response.Write("<script language=javascript>document.location.reload();window.close();</script>");
这样去写,请问是不是有问题啊。
这样去写了以后,还是不能马上在父页面中显示(也就是不能马上刷新),我在子页面中的修改。而是要等到程序下次运行的时候,父页面才显示了,我在子页面中所做的修改。