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.Layout.enableSourceBind

Adobe Community Help


Applies to

  • ColdFusion

Contact support

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

Description

If disabled, enables the source bind.

Function syntax

ColdFusion.Layout.enableSourceBind(Id)

Parameters

  • Id: Name of the layout area.

Usage

See usage in ColdFusion.Layout.disableSourceBind.

Example

See example in ColdFusion.Layout.disableSourceBind.

ColdFusion.FileUpload.getSelectedFiles

Description

Returns an array of objects containing the filename and size of the files selected for upload. The file size is returned in bytes. The function also returns file upload status as YES|NO|Error.

Function syntax

ColdFusion.FileUpload.getSelectedFiles(Id)

Parameters

  • Id: Name of the cffileupload control.

Usage

In a real life scenario, you normally use the uploader with other controls. For example, a form with three fields: name, email, and uploader. Assume that you upload the files, but forget to click Submit or you select the files, submit the form, but forget to click Upload. You can use this function to inform the user that there are files that have been selected for upload and provide the following details:

  • FILENAME: Name of the file selected for upload.
  • SIZE: Size of the file in bytes.
  • STATUS: YES|NO|Error; YES indicates a successful upload, NO indicates that the upload is yet to occur, and Error indicates that an exception has occurred during the upload operation.

Example

The following example illustrates a scenario where the user clicks Submit and is informed about the files selected for upload:

<html>
<head>
<script language="javascript">
var formatNumber = function(num){
if(num < 1024) return num + " bytes";
if(num < (1024 * 1024)) return (num/1024).toFixed(2) + " KB";
if(num < (1024 * 1024 *1024)) return (num/(1024 * 1024)).toFixed(2) + " MB";
return (num/(1024 * 1024 * 1024)).toFixed(2) + " GB";
}
var getSelectedList = function(id){
var files = ColdFusion.FileUpload.getSelectedFiles(id);
var fileslist = "";
if(files.length)
fileslist = "You have selected The following files for upload: \n\n";
for(var i=0;i < files.length; i++){
fileslist = fileslist + files[i].FILENAME + " (" + formatNumber(files[i].SIZE) + ")"
if(i != files.length-1)
fileslist = fileslist + "\r\n";
}
if(files.length)
{
alert(fileslist);
}
}
</script>
</head>
<body>
<br>
<cfform name="frmUpload" method="POST">
First Name: <cfinput type="text" name="fname" value=""><br>
Last Name: <cfinput type="text" name="lname" value=""><br><br>
<cffileupload
url="uploadAll.cfm"
name="myuploader1"
hideUploadButton=false
onUploadComplete="foo"
/><br><br>
<cfinput type="button" name="submitForm2" value="Submit" onClick="getSelectedList('myuploader1')">
</cfform>
</body>
</html>

To the top

See also

ColdFusion.Layout.expandAccordion

ColdFusion.Layout.disableTab

ColdFusion.Layout.enableTab

ColdFusion.Layout.expandArea

ColdFusion.Layout.getAccordionLayout

ColdFusion.Layout.getBorderLayout

ColdFusion.Layout.getTabLayout

ColdFusion.Layout.hideAccordion

ColdFusion.Layout.hideArea

ColdFusion.Layout.hideTab

ColdFusion.Layout.selectAccordion

ColdFusion.Layout.selectTab

ColdFusion.Layout.showAccordion

ColdFusion.Layout.showArea

ColdFusion.Layout.showTab

ColdFusion.Log.debug

ColdFusion.Log.dump

ColdFusion.Log.error

ColdFusion.Log.info

ColdFusion.Map.addEvent

ColdFusion.Map.addMarker

ColdFusion.Map.getLatitudeLongitude

ColdFusion.Map.getMapObject

ColdFusion.Map.hide

ColdFusion.Map.refresh

ColdFusion.Map.setCenter

ColdFusion.Map.setZoomlevel

ColdFusion.Map.show

ColdFusion.MediaPlayer.getPlayer

ColdFusion.Mediaplayer.getType

ColdFusion.Mediaplayer.logError

ColdFusion.Mediaplayer.resize

ColdFusion.Mediaplayer.setTitle

ColdFusion.Mediaplayer.setMute

ColdFusion.Mediaplayer.setSource

ColdFusion.Mediaplayer.setVolume

ColdFusion.Mediaplayer.startPlay

ColdFusion.Mediaplayer.stopPlay

ColdFusion.MessageBox.create

ColdFusion.MessageBox.show


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