Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 817

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
• They can be modal (users cannot interact with the main window when the pop-up window is displayed) or non-
modal (users can interact with both windows).
• You can specify that the user can drag, close, or resize the window.
• You can create and show a window independently. After you create the window, you can use JavaScript functions
to show and hide it multiple times without having to create it again.
Display and hide windows
You display a window in the following ways:
• By using a ColdFusion
cfwindow
• By using a ColdFusion
cfwindow
ColdFusion.Window.show JavaScript function to display it.
• By using ColdFusion.Window.create and ColdFusion.Window.show JavaScript functions.
You can hide a window that is currently showing by calling the ColdFusion.Window.hide function. You can use the
ColdFusion.Window.onShow
when a window shows or hides.
The following example shows how you can create, display, and hide a window. It also shows several of the
configuration options that you can set, including whether the user can close, drag, or resize the window. When you
run the application, the
cfwindow
Window 2, click the Create Window 2 button, followed by the Show Window 2 button. You can then hide and show it.
The following example shows the main application page:
<html>
<head>
<script>
<!--
//Configuration parameters for window 2.
var config =
{x:250,y:300,height:300,width:300,modal:false,closable:false,
draggable:true,resizable:true,initshow:false,minheight:200,minwidth:200
}
-->
</script>
</head>
<body>
<!--- Create a window with a title and show it. Don't allow dragging or resizing. --->
<cfwindow name="window1" title="CFML Window" draggable="false"
resizable="false" initshow="true" height="250" width="250" x=375 y=0>
<p>
This content was defined in the cfwindow tag body.
</p>
</cfwindow>
tag with an
initShow
tag with an
initShow
and
ColdFusion.Window.onhide
tag creates and shows Window 1. You can then hide it and reshow it. To show
Last updated 1/20/2012
attribute value of to create and show the window.
attribute value of
and calling the
false
functions to specify JavaScript functions to run
812

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents