Reputation: 43
I'm working on a Coldfusion application that lists employees. Whenever I click on "edit profile" a <cfwindow>
is opened which can be edited and saved to the database.
After saving, when the user closes the window I want the parent page to reload.
I am using my cfwindow
this way
<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>
Upvotes: 1
Views: 1543
Reputation: 43
Adapting this example from the documentation worked for me. I added this code to the parent page:
<script language="javascript">
function test(name) {
ColdFusion.Window.hide(name);
window.location.reload();
}
</script>
... and this code in child page:
<cfinput name="button" value="Hide Window"
type="button"
onClick="javascript:test('window name')"/>
Upvotes: 1