How to use CFwindow refreshonshow property in ColdFusion

cfwindow - refreshonshow property

cfwindow.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfwindow tag example: how to use refreshonshow property in cfwindow</title>
</head>

<body>
<h2 style="color:Olive; font-style:italic">cfwindow tag example: refreshonshow true</h2>
<hr width="550" align="left" color="Beige" />
<br />

<a href="JavaScript:ColdFusion.Window.show('RandomNumberWindow')">
 <b>Show Window</b>
</a>
   
<a href="JavaScript:ColdFusion.Window.hide('RandomNumberWindow')">
 <b>Hide Window</b>
</a>

<cfwindow 
 name="RandomNumberWindow" 
    title="Random Number"
    refreshonshow="true"
    x="25" 
    y="140"
    source="MyWindowSource.cfm"
    draggable="false"
    closable="false"
    initshow="true"
    >
</cfwindow>

</body>
</html>


MyWindowSource.cfm


<h4 style="color:DarkBlue;">
 <cfset RandomNumber = RandRange(1,99)>
    <cfoutput>My Random Number: #RandomNumber#</cfoutput>
</h4>













More ColdFusion examples