Whatever message this page gives is out now! Go check it out!

ColdFusion.Window.onHide

Last update:
May 18, 2026

Description

Specifies a function to run each time a specific window hides.

Function syntax

ColdFusion.Window.onHide(windowName, handler)

See also

Using pop-up windows in Using Ajax form controls and features in the Developing ColdFusion Applications

History

ColdFusion 8: Added this function

Parameters

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.

Returns

This function does not return a value.

Usage

The function specified in the handler parameter can optionally take one parameter, which contains the window name.

Example

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>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page