'+ZSEncoder.encodeForHTML(zsCloudAttachmentName)+'X
';jQuery('#zsFileBrowseAttachments').append(zsCloudAttachmentsList);zsAttachmentsArray.push(attachmentsDetailJSON);zsCloudPickerJSON[cloudServiceName] = zsAttachmentsArray;jQuery("input[name='zsCloudPickerAttachments']")[0].value = JSON.stringify(zsCloudPickerJSON);}}});}zsChangeMousePointer();}jQuery(document).off('click.cAtm').on('click.cAtm','.zscloudAttachment', function(){var cloudService = jQuery(this).attr('cloudservice');var cloudAttachmentId = jQuery(this).attr('id');var zsCloudAttachmentsArr = zsCloudPickerJSON[cloudService];var isZsCloudAttachmentRemoved = 0;for(var attachmentsIndex = 0; attachmentsIndex < zsCloudAttachmentsArr.length; attachmentsIndex++){if(isZsCloudAttachmentRemoved != 1){jQuery.each(zsCloudAttachmentsArr[attachmentsIndex], function(attachmentsDetailJsonKey, attachmentsDetailJsonValue){if(attachmentsDetailJsonKey == 'docId' && attachmentsDetailJsonValue.replace(/\s/g, '') == cloudAttachmentId){var zsAttachmentToBeRemoved = jQuery.inArray(zsCloudAttachmentsArr[attachmentsIndex], zsCloudAttachmentsArr);zsCloudAttachmentsArr.splice(zsAttachmentToBeRemoved, 1);isZsCloudAttachmentRemoved = 1;}});}}jQuery(this).parent().remove();zsAttachedAttachmentsCount = zsAttachedAttachmentsCount - 1;jQuery("input[name='zsCloudPickerAttachments']")[0].value = JSON.stringify(zsCloudPickerJSON);zsChangeMousePointer();});function zsRenderBrowseFileAttachment(zsAttachmentObject, zsAttachmentDetails){if(zsAttachmentObject != ''){if((zsAttachmentDetails.files && (zsAttachmentDetails.files[0].size/(1024*1024))>20)){zsAttachmentDetails.value='';alert('Maximum allowed file size is 20MB.');return;}if(zsAttachedAttachmentsCount < 5){var zsFileName='';if((zsAttachmentObject.indexOf('\\') > -1)){var zsAttachmentDataSplits = zsAttachmentObject.split('\\');var zsAttachmentDataSplitsLen = zsAttachmentDataSplits.length;zsFileName = zsAttachmentDataSplits[zsAttachmentDataSplitsLen - 1];}else{zsFileName = zsAttachmentObject;}var extension = zsFileName.split('.').pop().toLowerCase();var unSupportedExtensions = ["ade","adp","bat","chm","cmd","com","cpl","exe","hta","ins","isp","jar","lib","lnk","mde","msc","msp","mst","pif","scr","sct","shb","sys","vb","vbe","vxd","wsc","wsf","wsh","jse","vbs"];if(unSupportedExtensions.indexOf(extension)!=-1){alert("The file wasn't attached since its extension is not supported.");return;}var zsCurrentAttachmentIdTokens = jQuery(zsAttachmentDetails).attr('id').split('_');var zsCurrentAttachmentId = parseInt(zsCurrentAttachmentIdTokens[1]);var zsAttachmentIdToBeRemoved = jQuery.inArray(zsCurrentAttachmentId, zsAttachmentFileBrowserIdsList);zsAttachmentFileBrowserIdsList.splice(zsAttachmentIdToBeRemoved, 1);var zsNextAttachmentId = zsAttachmentFileBrowserIdsList[0];var zsnextAttachment = 'zsattachment_'+zsNextAttachmentId;jQuery('#zsattachment_'+zsCurrentAttachmentId).hide();jQuery('#'+zsnextAttachment).show();jQuery('#zsFileBrowseAttachments').append(''+ ZSEncoder.encodeForHTML(zsFileName) + 'X
');zsAttachedAttachmentsCount = zsAttachedAttachmentsCount + 1;}}zsChangeMousePointer();}jQuery(document).off('click.fba').on('click.fba', '.zsfilebrowseAttachment', function(){var currentlyDeletedElement = jQuery(this).attr('id').split('_')[1];jQuery('#zsattachment_'+currentlyDeletedElement).val('');jQuery('#zsattachment_'+currentlyDeletedElement).replaceWith(jQuery('#zsattachment_'+currentlyDeletedElement).clone());jQuery(this).parent().remove();zsAttachedAttachmentsCount = zsAttachedAttachmentsCount - 1;zsAttachmentFileBrowserIdsList.push(parseInt(currentlyDeletedElement));zsRearrangeFileBrowseAttachments();zsChangeMousePointer();});function zsRearrangeFileBrowseAttachments(){jQuery.each(jQuery('input[type = file]'), function(fileIndex, fileObject){fileIndex = fileIndex + 1;if(fileIndex == zsAttachmentFileBrowserIdsList[0]){jQuery('#zsattachment_'+fileIndex).show();}else{jQuery('#zsattachment_'+fileIndex).hide();}});}function zsOpenFileBrowseAttachment(clickEvent){if(zsAttachedAttachmentsCount >= 5){clickEvent.preventDefault();}}function zsChangeMousePointer(){if(zsAttachedAttachmentsCount >= 5){jQuery('#zsMaxLimitMessage').show();jQuery('#zsattachment_1,#zsattachment_2,#zsattachment_3,#zsattachment_4,#zsattachment_5').hide();jQuery('#zsBrowseAttachment,#zsCloudAttachment').css('cursor', 'default');}else{jQuery('#zsMaxLimitMessage').hide();zsRearrangeFileBrowseAttachments();jQuery('#zsBrowseAttachment,#zsCloudAttachment').css('cursor', 'pointer');}}document.onreadystatechange = function(){if(document.readyState === 'complete' && window.zsRegenerateCaptcha ){zsRegenerateCaptcha();}setAllDependancyFieldsMapping();document.getElementById('zsSubmitButton_569344000000160139').removeAttribute('disabled');zsAttachedAttachmentsCount = 0;zsAttachmentFileBrowserIdsList = [1, 2, 3, 4, 5];jQuery('#zsFileBrowseAttachments').html('');jQuery.each(jQuery('input[type = file]'), function(fileIndex, fileObject){var zsAttachmentId = jQuery(fileObject).attr('id');var zsAttachmentNo = zsAttachmentId.split('_')[1];var zsAttachedFile = jQuery('#zsattachment_'+zsAttachmentNo);if(zsAttachedFile[0] != undefined && zsAttachedFile[0].files[0] != undefined){var zsFileBrowserAttachmentHtml = '';zsAttachedFileName = zsAttachedFile[0].files[0].name;zsFileBrowserAttachmentHtml = ''+ ZSEncoder.encodeForHTML(zsAttachedFileName) +'X
';jQuery('#zsFileBrowseAttachments').append(zsFileBrowserAttachmentHtml);zsAttachedAttachmentsCount = zsAttachedAttachmentsCount + 1;var zsAttachmentIdToBeRemoved = jQuery.inArray(parseInt(zsAttachmentNo), zsAttachmentFileBrowserIdsList);zsAttachmentFileBrowserIdsList.splice(zsAttachmentIdToBeRemoved, 1);}});if(document.forms['zsWebToCase_569344000000160139']['zsCloudPickerAttachments'] != undefined){var zsCloudAttachments = jQuery.parseJSON(document.forms['zsWebToCase_569344000000160139']['zsCloudPickerAttachments'].value);zsRenderCloudAttachments(zsCloudAttachments);}zsRearrangeFileBrowseAttachments();zsChangeMousePointer();};function zsResetWebForm(webFormId){document.forms['zsWebToCase_'+webFormId].reset();document.getElementById('zsSubmitButton_569344000000160139').removeAttribute('disabled');setAllDependancyFieldsMapping();zsAttachedAttachmentsCount = 0;zsAttachmentFileBrowserIdsList = [1, 2, 3, 4, 5];jQuery('#zsFileBrowseAttachments').html('');zsCloudPickerJSON = {};if(document.forms['zsWebToCase_569344000000160139']['zsCloudPickerAttachments'] != undefined){document.forms['zsWebToCase_569344000000160139']['zsCloudPickerAttachments'].value = JSON.stringify({});}zsRearrangeFileBrowseAttachments();zsChangeMousePointer();} </script>
Web Form | |
Your Name | |
What's your question about? | -None- Question Problem Feature Others |
Subject | |
Description | <textarea name='Description' maxlength='3000' width='250' height='250' ></textarea> |
Attachment | Attach files Each of your file(s) can be up to 20MB in size.You can attach as many as 5 files at a time. |