Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#Signature').bind('change', function () {
- //if (this.files[0].size > 4178944) {
- // alert("File size should not be more than 4 MB");
- // this.value = "";
- //}
- var signatureUpload = $("#Signature")[0];
- if (typeof (signatureUpload.files) != "undefined") {
- var reader = new FileReader();
- reader.readAsDataURL(signatureUpload.files[0]);
- reader.onload = function (e) {
- var image = new Image();
- image.src = e.target.result;
- image.onload = function () {
- height = this.height;
- width = this.width;
- if (height <= 80 && width <= 300) {
- }
- else {
- $("#Signature").val('');
- alert('Signature Height and Width should be less than or equal 80 and 300');
- }
- };
- }
- }
- if (this.files && this.files[0] && this.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)) {
- if (this.files[0].size > 1048576) {
- alert('File size is larger than 1MB!');
- }
- else {
- var reader = new FileReader();
- reader.onload = imageIsLoaded;
- reader.readAsDataURL(this.files[0]);
- }
- } else {
- this.value = "";
- alert('This is not an image file!');
- }
- });
- $('#GSignature').bind('change', function () {
- //if (this.files[0].size > 4178944) {
- // alert("File size should not be more than 4 MB");
- // this.value = "";
- //}
- var signatureUpload = $("#GSignature")[0];
- if (typeof (signatureUpload.files) != "undefined") {
- var reader = new FileReader();
- reader.readAsDataURL(signatureUpload.files[0]);
- reader.onload = function (e) {
- var image = new Image();
- image.src = e.target.result;
- image.onload = function () {
- height = this.height;
- width = this.width;
- if (height <= 80 && width <= 300) {
- }
- else {
- $("#GSignature").val('');
- alert('Signature Height and Width should be less than or equal 80 and 300');
- }
- };
- }
- }
- if (this.files && this.files[0] && this.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)) {
- if (this.files[0].size > 1048576) {
- alert('File size is larger than 1MB!');
- }
- else {
- var reader = new FileReader();
- reader.onload = imageIsLoaded;
- reader.readAsDataURL(this.files[0]);
- }
- } else {
- this.value = "";
- alert('This is not an image file!');
- }
- });
- $('#Image').bind('change', function () {
- //if (this.files[0].size > 4178944) {
- // alert("File size should not be more than 4 MB");
- // this.value = "";
- //}
- var signatureUpload = $("#Image")[0];
- if (typeof (signatureUpload.files) != "undefined") {
- var reader = new FileReader();
- reader.readAsDataURL(signatureUpload.files[0]);
- reader.onload = function (e) {
- var image = new Image();
- image.src = e.target.result;
- image.onload = function () {
- height = this.height;
- width = this.width;
- if (height <= 300 && width <= 300) {
- }
- else {
- $("#Image").val('');
- alert('Photo Height and Width should be less than or equal 300 and 300');
- }
- };
- }
- }
- if (this.files && this.files[0] && this.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)) {
- if (this.files[0].size > 1048576) {
- alert('File size is larger than 1MB!');
- }
- else {
- var reader = new FileReader();
- reader.onload = imageIsLoaded;
- reader.readAsDataURL(this.files[0]);
- }
- } else {
- this.value = "";
- alert('This is not an image file!');
- }
- });
- $('#NID').bind('change', function () {
- //if (this.files[0].size > 4178944) {
- // alert("File size should not be more than 4 MB");
- // this.value = "";
- //}
- var signatureUpload = $("#NID")[0];
- if (typeof (signatureUpload.files) != "undefined") {
- var reader = new FileReader();
- reader.readAsDataURL(signatureUpload.files[0]);
- reader.onload = function (e) {
- var image = new Image();
- image.src = e.target.result;
- image.onload = function () {
- height = this.height;
- width = this.width;
- if (height <= 500 && width <= 500) {
- }
- else {
- $("#NID").val('');
- alert('Photo Height and Width should be less than or equal 500 and 500');
- }
- };
- }
- }
- if (this.files && this.files[0] && this.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)) {
- if (this.files[0].size > 1048576) {
- alert('File size is larger than 1MB!');
- }
- else {
- var reader = new FileReader();
- reader.onload = imageIsLoaded;
- reader.readAsDataURL(this.files[0]);
- }
- } else {
- this.value = "";
- alert('This is not an image file!');
- }
- });
- $('#GImage').bind('change', function () {
- //if (this.files[0].size > 4178944) {
- // alert("File size should not be more than 4 MB");
- // this.value = "";
- //}
- var signatureUpload = $("#GImage")[0];
- if (typeof (signatureUpload.files) != "undefined") {
- var reader = new FileReader();
- reader.readAsDataURL(signatureUpload.files[0]);
- reader.onload = function (e) {
- var image = new Image();
- image.src = e.target.result;
- image.onload = function () {
- height = this.height;
- width = this.width;
- if (height <= 300 && width <= 300) {
- }
- else {
- $("#GImage").val('');
- alert('Photo Height and Width should be less than or equal 300 and 300');
- }
- };
- }
- }
- if (this.files && this.files[0] && this.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)) {
- if (this.files[0].size > 1048576) {
- alert('File size is larger than 1MB!');
- }
- else {
- var reader = new FileReader();
- reader.onload = imageIsLoaded;
- reader.readAsDataURL(this.files[0]);
- }
- } else {
- this.value = "";
- alert('This is not an image file!');
- }
- });
- $('#GNID').bind('change', function () {
- //if (this.files[0].size > 4178944) {
- // alert("File size should not be more than 4 MB");
- // this.value = "";
- //}
- var signatureUpload = $("#GNID")[0];
- if (typeof (signatureUpload.files) != "undefined") {
- var reader = new FileReader();
- reader.readAsDataURL(signatureUpload.files[0]);
- reader.onload = function (e) {
- var image = new Image();
- image.src = e.target.result;
- image.onload = function () {
- height = this.height;
- width = this.width;
- if (height <= 500 && width <= 500) {
- }
- else {
- $("#GNID").val('');
- alert('Photo Height and Width should be less than or equal 500 and 500');
- }
- };
- }
- }
- if (this.files && this.files[0] && this.files[0].name.match(/\.(jpg|jpeg|png|gif)$/)) {
- if (this.files[0].size > 1048576) {
- alert('File size is larger than 1MB!');
- }
- else {
- var reader = new FileReader();
- reader.onload = imageIsLoaded;
- reader.readAsDataURL(this.files[0]);
- }
- } else {
- this.value = "";
- alert('This is not an image file!');
- }
- });
- $('#Application').bind('change', function () {
- if (this.files[0].size > 3679232) {
- alert("File size should be within 3.5 MB!!");
- this.value = "";
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement