Adobe COLDFUSION 9 Manual page 818

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
<form>
<!--- Use the API to show and hide Window 1. --->
<input type="button" value="Show Window1"
onClick="ColdFusion.Window.show('window1')">
<input type="button" value="Hide Window1"
onClick="ColdFusion.Window.hide('window1')"><br />
<!--- Use the API to create, show, and hide Window 2 --->
<input type="button" value="Create Window2"
onClick="ColdFusion.Window.create('window2', 'JavaScript Window',
'window2.cfm', config)">
<input type="button" value="Show Window2"
onClick="ColdFusion.Window.show('window2')">
<input type="button" value="Hide Window2"
onClick="ColdFusion.Window.hide('window2')">
</form>
</body>
</html>
The window2.cfm file with the contents of Window 2 has the following contents:
<cfoutput>
<p>
This content was loaded into window 2 from a URL.<br />
</p>
</cfoutput>
Use the window show and hide events
You can use the
and
onShow
application. To do so, call the ColdFusion.Window.onShow and ColdFusion.Window.onHide functions to specify the
event handlers. Both functions take the window name and the handler function as parameters. The event handler
functions can take a single parameter, the window name.
The following example displays an alert message when a window hides or shows. The alert message includes the
window name. The alert does not show when the window first appears, because the
attribute to initially display the window. An alert message does appear when the user hides the window by clicking the
Toggle Window button or the close button on the window.
events that are triggered each time a window shows and hides to control your
onHide
Last updated 8/5/2010
tag uses the
cfwindow
initShow
813

Advertisement

Table of Contents
loading

Table of Contents