Disable inputfile during the upload

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Disable inputfile during the upload

Guest-858
Hi!

I would like to disable the inputFile during the upload, soh the user will cannot "incidentally" starts a new upload, during a transfer. Is there any way to do that?

I've tried to used the "onClientClick" event on my submit button, but it wasn't fired anyway. I also had tried to hook the onsubmit function in the neatUpload.jas, but when I could disable the inputfile control, the upload suddenly stops.

I'm using the NeatupLoad v.1.3 trunk 775.

Thanks!!
Reply | Threaded
Open this post in threaded view
|

Re: Disable inputfile during the upload

Dean Brettle
Administrator
I'm not sure off-hand why disabling the InputFile control from onClientClicked wouldn't work.  FWIW, the GreyBoxProgressBar Extension will effectively disable the whole form while the upload is occuring.  Also the UnloadConfirmer control can Preventing Accidental Upload Interruptions from a variety of causes.

Reply | Threaded
Open this post in threaded view
|

Re: Disable inputfile during the upload

Dean Brettle
Administrator
I tried using OnClientClicked and ran into the same behavior you described.  However, this behavior isn't specific to NeatUpload.  A regular ASP.NET FileUpload or HtmlInputFile control will have the same behavior.  I think browsers just don't upload files in disabled form controls.  I think the other two options are the correct way to handle this issue.