Hello, I'm trying to make manual handle when to show/hide inputs for radasyncupload.
var
filesUploaded = 1;
var
maxFileCount = 2;
function
FileSelected(sender, args) {
filesUploaded++;
if
(maxFileCount == filesUploaded)
$(
".ruInputs > li:last"
).remove();
}
function
FileUploadRemoved(sender, args) {
if
(maxFileCount == filesUploaded)
sender.addFileInput();
filesUploaded--;
}
Following code works quite well if fileUploaded is initialy 0. But once I need to set it to 1 on the beginning.
Scenario is following:
Add file. - input disapears. - correct
remove file - two inputs is showing.
I would like to prevent such scenario.
I don't have MaxFileInputsCount set to control - I don't like the way how it is handling file. And it causing me other problems.
And more thing. I don't know whay but e.g. in firefox 4b11. After some adds and removes clicking on control not working. Looks like silverlight not support clicking any more. (Silverlight is loading by default). The version I have is 2010.3.1317.40. Ican click multiple times and sometimes it is working sometimes not.