UploadButton
An UploadButton enables site visitors to upload files to your site. Learn more.
Additional information about this section
Store values associated with an object
- buttonLabel
Sets or gets the label on the upload button.
- fileLimit
Sets or gets the maximum amount of files a site visitor can upload at a time.
- fileType
Sets or gets the type of file a site visitor can upload.
- style
Gets an object containing information about the upload button's styles.
- valid
Indicates if a required file was selected, and if the file is valid for upload to the Media Manager.
- validationMessage
Gets a message indicating why the file is invalid or could not be uploaded. Contains empty string if the file is valid and successfully uploaded.
- validity
Gets a ValidityState object that contains detailed information about the validity states of the file to upload.
- value
Returns a list of files that are pending upload.
- label
Sets or gets the label of an element.
- customClassList
A property that represents an element's custom CSS classes.
- deleted
Indicates if an element was temporarily deleted from the DOM. Use the restore function to restore the deleted element.
- rendered
Indicates if an element is currently in the DOM structure.
- global
Indicates if an element appears on all pages or only on the current page.
- id
Gets the element's ID.
- parent
Gets the element's parent element.
- type
Gets the element's type.
- hidden
Indicates if the element is visible or hidden.
- isVisible
Indicates if the element is actually visible.
- collapsed
Indicates if the element is collapsed or expanded.
- enabled
Indicates if the element is enabled or disabled.
- required
Sets or gets whether an input element is required to have a value.
Perform actions on an object
- onCustomValidation( )
Adds an event handler that runs when the element's validation is checked.
- reset( )
Clears the files that are pending upload.
- startUpload( )
Deprecated. This function will continue to work, but a newer version is available. Use the uploadFiles() function instead.
- uploadFiles( )
Uploads the files that the site visitor has chosen.
- delete( )
Deletes an element from the DOM. This is a temporary deletion. Use restore to restore the deleted element. SEO crawlers cannot find content in an element whose ...
- onMouseIn( )
Adds an event handler that runs when the pointer is moved onto the element. You can also define an event handler using the Properties and Events panel.
- onMouseOut( )
Adds an event handler that runs when the pointer is moved off of the element. You can also define an event handler using the Properties and Events panel.
- restore( )
Restores a deleted element to the DOM.
- scrollTo( )
Scrolls the page to the top of the element using an animation.
- onViewportEnter( )
Adds an event handler that runs when an element is displayed in the viewable part of the current window.
- onViewportLeave( )
Adds an event handler that runs when an element is no longer displayed in the viewable part of the current window.
- resetValidityIndication( )
Resets the element's visual validity indication.
- updateValidityIndication( )
Updates the element's visual validity indication based on its current validity state.
- onChange( )
Adds an event handler that runs when an input element's value is changed.
- hide( )
Hides the element and sets its hidden property to true, using an effect if specified.
- show( )
Shows the element and sets its hidden property to false, using an effect if specified.
- collapse( )
Collapses the element and sets its collapsed property to true.
- expand( )
Expands the element and sets its collapsed property to false.
- disable( )
Disables the element and sets its enabled property to false.
- enable( )
Enables the element and sets its enabled property to true.
- blur( )
Removes focus from the element.
- focus( )
Places focus on the element.
- onBlur( )
Adds an event handler that runs when the element loses focus.
- onFocus( )
Adds an event handler that runs when the element receives focus.
Related Content