Axosoft Support Forums
»
SlickUpload
»
SlickUpload Support
»
How do I disable upload button until user selects a file
|
|
Rank: Member
Groups: Registered
Joined: 11/22/2011 Posts: 17 Location: Florida
|
I want to make sure that users cannot click the "Upload" button unless he/she's selected at least one file.
How do I disable the upload button until there's at least one file to upload? Thanks, Sam
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
I would suggest this:
- Set the button disabled initially
- Add handlers for OnClientFileAdded and OnClientFileRemoved that both point to a javascript onClientFileSelectionChanged function
- In that function, check to see if there are files, and set enabled. Like this:
function onFileSelectionChanged(data)
{
if (kw("<%=slickUpload.ClientID %>").get_Files().length > 0)
// TODO: set enabled
else
// TODO: set disabled
}
Will that work for you?
|
|
|
|
Guest |
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.