For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
CFML Reference / 

ColdFusion.Window.create

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

Description

Creates a ColdFusion pop-up window. This function is equivalent to the cfwindow tag.

Function syntax

ColdFusion.Window.create(name, title, URL [, configuration])

See also

cfwindow, ColdFusion.Window.getWindowObject, ColdFusion.Window.hide, ColdFusion.Window.onHide, 

ColdFusion.Window.onShow, ColdFusion.Window.show, ColdFusion.Tree.getTreeObject, 

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

name

The name of the window. This attribute is required to interact with the window, including to dynamically show or hide it. If a window with the specified name exists, the function shows that window, and ignores the remaining parameters; otherwise, the name must be unique on the page.

title

The text to display on the window title bar. You can use HTML mark-up to control the title appearance.

URL

The URL from which to get the window body contents. This attribute can use URL parameters to pass data to the page. ColdFusion uses standard page path resolution rules to locate the page.Note: If the page specified in this attribute contains tags that use ColdFusion Ajax features, such as the cfform, cfgrid, and cfpod tags, identify the tags in a cfajaximport tag on the page that includes this function. For more information, see cfajaximport.

configuration

An object containing window configuration parameters. For details, see "Usage".

refreshonshow

The default value is false.

Returns

This function does not return a value.

Usage

This function is equivalent to the cfwindow tag. If you do not also use a cfwindow tag on a page that calls this function, specify a cfajaximport tag on the page and specify cfwindow in the tags attribute. Doing so ensures that the page includes the necessary JavaScript to create the window. For example, use the following line if you do not have to import the JavaScript for any other ColdFusion Ajax features.:

<cfajaximport tags="cfwindow">

The configuration parameter defines the window characteristics; it can have any or all the following entries:

Entry

Default

Description

callbackhandler

 

A function that is called when the window body loads. This function must not take any arguments.

center

false

A Boolean value that specifies whether to center the window over the browser window.

  • If true, ColdFusion ignores the x and y attribute values.
  • If false, and you do not specify x and y attributes, ColdFusion centers the window.

closable

true

A Boolean value that specifies whether the user can close the window. If true, the window has an X close icon.

draggable

true

A Boolean value that specifies whether the user can drag the window. To drag the window, click the mouse on the title bar and hold the button down while dragging. If the window does not have a title, users cannot drag it.

errorHandler

 

A function that is called if an error occurs in loading the window body. This function must take two arguments:

  • The HTTP status code, or -1 if the error is not an HTTP error
  • An error message

height

300

Height of the window in pixels. If you specify a value greater than the available space, the window occupies the available space and the resize handles do not appear.

initshow

false

A Boolean value that specifies whether to display the window when the containing page first displays. If this value is false, use the ColdFusion.Window.show JavaScript function to display the window.

minheight

0

The minimum height, in pixels, to which users can resize the window.Specifying this parameter and a resizable="false" parameter causes an error.

minwidth

0

The minimum width, in pixels, to which users can resize the window.Specifying this parameter and a resizable="false" parameter causes an error.

modal

false

A Boolean value that specifies whether the window is modal, that is, whether the user can interact with the main window while this window is displaying. If true, the user cannot interact with the main window.

resizable

true

A Boolean value that specifies whether the user can resize the window.

width

500

Width of the window in pixels. If you specify a value greater than the available space, the window occupies the available space and the resize handles do not appear.

x

 

The X (horizontal) coordinate of the upper-left corner of the window, relative to the browser window. ColdFusion ignores this attribute if the center attribute value is true, and if you do not set the y attribute value.

y

 

The Y (vertical) coordinate of the upper-left corner of the window, relative to the browser window.ColdFusion ignores this attribute if the center attribute value is true, and if you do not set the x attribute value.

 

Note: Entry names in the configuration object must be all-lowercase.

Example

The following minimal CFML application creates a window and gets the window contents from the hello1.cfm file.

<cfajaximport tags="cfwindow">

<cfform name="test">
<cfinput type="button" name="x" value="Create Window"
onClick="ColdFusion.Window.create('Window1', 'This is a CF window',
'http://localhost:8500/My_stuff/AjaxUI/Book/hello1.cfm',
{x:100,y:100,height:300,width:400,modal:false,closable:false,
draggable:true,resizable:true,center:true,initshow:true,
minheight:200,minwidth:200 })">
</cfform>

The hello1.cfm file can be as simple as the following line:

Hello from hello1.cfm

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices