Hello there.
I am trying to get separate client validation messages for AsyncUpload depending upon whether it was a fail due to filesize or extention type.
At the moment i can only get a generic message using :
function validationFailed(sender, eventArgs) {
//var RadProgressArea1 = $('#<%= RadProgressArea1.ClientID %>');
// $.each(sender, function(i, n) {
// alert("Name: " + i + ", Value: " + n);
// });
$("#errorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
}
I want seperate messages for those two cases.
i have also tried to not specify maxfilesize in asyncupload and catch filesize error in
function ClientProgressUpdating(sender, args) {
if(args.get_data().fileSize > 3145728)
{
sender.deleteFileInputAt(0);
$("#errorHolder").append("<p>file size if more than max for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
// if(confirm("Are you sure"))
// {
// //validationFailed(sender, args);
// return false;
// $("#errorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
// }
}
//
}
it stops the fileupload but hangs at the screen where the progress bar is not moving forward and doesnt set the error message label
Thank you for helping.
I am trying to get separate client validation messages for AsyncUpload depending upon whether it was a fail due to filesize or extention type.
At the moment i can only get a generic message using :
function validationFailed(sender, eventArgs) {
//var RadProgressArea1 = $('#<%= RadProgressArea1.ClientID %>');
// $.each(sender, function(i, n) {
// alert("Name: " + i + ", Value: " + n);
// });
$("#errorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
}
I want seperate messages for those two cases.
i have also tried to not specify maxfilesize in asyncupload and catch filesize error in
function ClientProgressUpdating(sender, args) {
if(args.get_data().fileSize > 3145728)
{
sender.deleteFileInputAt(0);
$("#errorHolder").append("<p>file size if more than max for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
// if(confirm("Are you sure"))
// {
// //validationFailed(sender, args);
// return false;
// $("#errorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
// }
}
//
}
it stops the fileupload but hangs at the screen where the progress bar is not moving forward and doesnt set the error message label
Thank you for helping.