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> |