|
ColdFusion 9.0 Resources |
ColdFusion.FileUpload.cancelUploadDescriptionAt any point during the upload of files, you can choose to cancel the upload. When you cancel the upload, any further upload of files stops. Function syntaxColdFusion.FileUpload.cancelUpload(name) HistoryColdFusion 9: Added this function Parameters
ReturnsThis function does not return a value. ExampleThis example includes a button for the Cancel Upload action. When you click this button, the file upload is canceled. <h3>This is an example of the FileUpload.cancelUpload function. Add a few files to upload and click Upload. During upload, click the Cancel Upload HTML button to cancel the upload.</h3>
<script language="JavaScript" type="text/javascript">
function onCancel() {
ColdFusion.FileUpload.cancelUpload('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="cancelupld" value="Cancel Upload"
onclick="onCancel()">
</cfform>
|