Description

Starts uploading the selected files.

Function syntax

ColdFusion.FileUpload.startUpload(name)

See also

ColdFusion.FileUpload.cancelUploadColdFusion.FileUpload.clearAllFiles

History

ColdFusion 9: Added this function

Parameters

Parameter

Description

name

The value of the name attribute in the cffileupload tag.

Returns

This function does not return a value.

Example

This example includes a button to start the Upload action. When you click this button, the selected files start uploading.

<script language="JavaScript" type="text/javascript">
function onUpload() {
ColdFusion.FileUpload.startUpload('myupload');
};
</script>
<cffileupload
url="uploadAll.cfm"
progressbar="true"
name="myupload"
addButtonLabel = "Add File"
clearButtonlabel = "Clear it"
width=600
height=400
title = "File Upload"
maxuploadsize="30"
extensionfilter="*.jpg, *.png, *.flv, *.txt"
BGCOLOR="##FFFFFF"
MAXFILESELECT=10
UPLOADBUTTONLABEL="Upload now"/>
<cfform name="form01">
<cfinput type="button" name="startupload" value="Start Upload"
onclick="onUpload()">
</cfform>

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