Specifies a function to run each time a specific window hides.
ColdFusion.Window.onHide(windowName
,handler
)
cfwindow, ColdFusion.Window.create, ColdFusion.Window.getWindowObject, ColdFusion.Window.hide, ColdFusion.Window.onShow, ColdFusion.Window.show, "Using pop-up windows" in the ColdFusion Developer's Guide
ColdFusion 8: Added this function
Parameter |
Description |
---|---|
windowName |
The name of the window. The handler function runs whenever this window hides. |
handler |
The JavaScript function to run when the window hides. |
This function does not return a value.
The function specified in the handler
parameter can optionally take one parameter, which contains the window name.
The following example uses the ColdFusion.Window.onHide function to display an alert with information about the window when you click a button that hides the window:
<head> <script language="javascript"> function onhide(name) { alert("window hidden = " + name); } function test() { ColdFusion.Window.onHide("testWindow", onhide); ColdFusion.Window.hide("testWindow"); } </script> </head> <body> <cfwindow name="testWindow" initshow=true title="test window" closable=true> Window contents </cfwindow> <cfform> <cfinput name="button" value="Hide Window" onclick="javascript:test()" type="button"/> </cfform> </body> </html>