我正在开发一个列出员工列表的Coldfusion应用程序。每当我点击“编辑配置文件”时,就会打开一个<cfwindow>,它可以被编辑并保存到数据库中。保存后,当用户关闭窗口时,我希望父页面重新加载。
我以这种方式使用我的cfwindow
<cfwindow x="0" y="100" width="400" height="400" center="true"
name="#empname#2" title="Employee details" modal="true"
closable="true" draggable="true" resizable="true" initshow="false"
source="http://localhost:8500/tasks/task1/details.cfm?empname=#empname#"/>
<cfform name="form1">
<cfinput type="button" name="#empname#" value="Edit Profile" onClick="javascript:ColdFusion.Window.show('#empname#')" >
</cfform>发布于 2013-07-24 14:38:56
改编this example from the documentation对我很有效。我在父页面中添加了以下代码:
<script language="javascript">
function test(name) {
ColdFusion.Window.hide(name);
window.location.reload();
}
</script>..。子页面中的代码如下:
<cfinput name="button" value="Hide Window"
type="button"
onClick="javascript:test('window name')"/>https://stackoverflow.com/questions/17805382
复制相似问题