$("#kendoUploadPPR").kendoWindow({
actions: ["Maximize", "Close"],
draggable: false,
height: "600px",
modal: true,
pinned: false,
position: {
top: 100,
left: 100
},
resizable: false,
title: "PPR Details",
width: "1000px"
});
Friday, June 6, 2014
Kendo PopUp Resize
JavaScript code for checking total document or file size at client side
// Javascript code for checking total document size.
var filesize1 = 0;
var filesize2 = 0;
var filesize3 = 0;
var filesize4 = 0;
var filesize5 = 0;
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '02' + '_fuReuploadPath').bind('change', function () {
filesize1 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '02' + '_lblFU').text(filesize1 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '03' + '_fuReuploadPath').bind('change', function () {
filesize2 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '03' + '_lblFU').text(filesize2 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '04' + '_fuReuploadPath').bind('change', function () {
filesize3 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '04' + '_lblFU').text(filesize3 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '05' + '_fuReuploadPath').bind('change', function () {
filesize4 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '05' + '_lblFU').text(filesize4 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '06' + '_fuReuploadPath').bind('change', function () {
filesize5 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '06' + '_lblFU').text(filesize5 + "KB");
EnableDisableUpdate();
});
function EnableDisableUpdate() {
if ((filesize1 + filesize2 + filesize3 + filesize4 + filesize5) > 10000) {
changeColor('red');
$('#ctl00_ContentPlaceHolder1_btnUpload').attr('disabled', 'disabled');
alert("Document size more than 10 MB please reduce size.");
} else {
changeColor('green');
$('#ctl00_ContentPlaceHolder1_btnUpload').removeAttr('disabled');
}
}
function changeColor(color) {
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '02' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '03' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '04' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '05' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '06' + '_lblFU').css({ color: color });
}
var filesize1 = 0;
var filesize2 = 0;
var filesize3 = 0;
var filesize4 = 0;
var filesize5 = 0;
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '02' + '_fuReuploadPath').bind('change', function () {
filesize1 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '02' + '_lblFU').text(filesize1 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '03' + '_fuReuploadPath').bind('change', function () {
filesize2 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '03' + '_lblFU').text(filesize2 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '04' + '_fuReuploadPath').bind('change', function () {
filesize3 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '04' + '_lblFU').text(filesize3 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '05' + '_fuReuploadPath').bind('change', function () {
filesize4 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '05' + '_lblFU').text(filesize4 + "KB");
EnableDisableUpdate();
});
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '06' + '_fuReuploadPath').bind('change', function () {
filesize5 = Math.round(this.files[0].size / 1024);
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '06' + '_lblFU').text(filesize5 + "KB");
EnableDisableUpdate();
});
function EnableDisableUpdate() {
if ((filesize1 + filesize2 + filesize3 + filesize4 + filesize5) > 10000) {
changeColor('red');
$('#ctl00_ContentPlaceHolder1_btnUpload').attr('disabled', 'disabled');
alert("Document size more than 10 MB please reduce size.");
} else {
changeColor('green');
$('#ctl00_ContentPlaceHolder1_btnUpload').removeAttr('disabled');
}
}
function changeColor(color) {
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '02' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '03' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '04' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '05' + '_lblFU').css({ color: color });
$('#ctl00_ContentPlaceHolder1_gvReuploadDocs_ctl' + '06' + '_lblFU').css({ color: color });
}
Kendo file upload to check file type at client side
<script type="text/javascript"> function onUpload(e) { // Array with information about the uploaded files var files = e.files; // Check the extension of each file and abort the upload if it is not .jpg $.each(files, function() { if (this.extension != ".jpg") { alert("Only .jpg files can be uploaded") e.preventDefault(); return false; } }); } </script>
Microsoft Excel Application entry missing in DCOMCNFG
1. Click start button, in start search bar, type in "DCOMCNFG.EXE" (without quote) and then press enter.
2. Click Computer->DCOM Config, locate component with CLSID {00024500-0000-0000-C000-000000000046}and modify the permission.
00020812-0000-0000-C000-000000000046
00024500-0000-0000-C000-000000000046
Link
2. Click Computer->DCOM Config, locate component with CLSID {00024500-0000-0000-C000-000000000046}and modify the permission.
00020812-0000-0000-C000-000000000046
00024500-0000-0000-C000-000000000046
Link
Subscribe to:
Posts (Atom)