How to use ColdFusion.Window.onShow Ajax JavaScript Function

Ajax - ColdFusion.Window.onShow

ColdFusionWindowonShow.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript">
 function onhide(windowName) {
 alert(windowName  + " window now visible!");
 }
 
 function showLinkClick() {
 ColdFusion.Window.onShow("ButterflyWindow", onhide);
 ColdFusion.Window.show("ButterflyWindow");
 }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax JavaScript Function: how to use ColdFusion.Window.onShow in coldfusion</title>
</head>

<body>

<h2 style="color:SeaGreen; font-style:italic">Ajax JavaScript Function example: ColdFusion.Window.onShow</h2>
<hr width="600" align="left" color="Beige" />
<br />

<a href="JavaScript:showLinkClick()">
 <b>Show the Window</b>
</a>

<cfwindow 
 name="ButterflyWindow" 
    title="Butterfly Image" 
    x="25"
    y="150"
    height="350"
    width="510"
    closable="false"
    draggable="false"
    initshow="false"
    >
 <img src="Images/Butterfly10.jpg" height="287" width="468" />
</cfwindow>

</body>
</html>













More ColdFusion examples