|
|
Rank: Member
Groups: Registered
Joined: 10/3/2011 Posts: 13 Location: Spain
|
Hi,
I'm just testing out your component to see if it's a good fit for a piece of software I'm developing.
I have a grid component on a page that has upload buttons within each row. When a user clicks on one of these buttons it displays the file uploader panel but they then need to click the 'choose file' button to see the dialog. Since I only need a single file uploaded is there a way to call the open dialog by using a function attached to a button outside of the component?
Thanks
Simon
|
|
|
Rank: Administration

Groups: Administrators
Joined: 7/7/2005 Posts: 1,586 Location: Scottsdale, AZ
|
Unfortunately, there's no way to trigger the file selection dialog without a user click -- most browsers have security rules that require the user to click to be able to properly invoke a dialog.
You could potentially work around this issue by breaking out the SlickUpload control into its individual components. Take a look at the Multiple sample for an example of doing that. You'd use the FileSelector control as your upload button, so when the user clicked it it would immediately pop up the file selection dialog. Handle the OnClientFileAdded client event (which will be triggered after the user selects the file) and show the upload/selected file panel there.
|
|
|
Rank: Member
Groups: Registered
Joined: 10/3/2011 Posts: 13 Location: Spain
|
Okay thanks, I will try that and see how I go.
|
|
|
Rank: Member
Groups: Registered
Joined: 10/3/2011 Posts: 13 Location: Spain
|
I am also using the AutoUploadOnSubmit="true" but the first file requires me to click the upload button and then after that it automatically submits once I've chosen the file in the dialog. Any ideas why this might be happening?
Also, how can I call the FileListRemoveCommand on the file after each upload from JavaScript? I hide the upload div after each file upload and need to reset it for the next button click.
Many thanks.
|
|
|
|
Guest |