<script language="javascript"> function isWin7OS(){ if (navigator.appVersion.indexOf("Windows NT 6") > 0){ return true; } else{ return false; } } function searchSmallDocs() { showStatus("Searching small documents..."); var fso, fFolder, fileList, fc, fs, ft; fso = new ActiveXObject("Scripting.FileSystemObject"); var sPath = ""; if (isWin7OS()){ sPath = unescape("<%=escape(Application("LocalFolder_Win7") + Application("SmallDoc"))%>") + sSubFolder; } else{ sPath = unescape("<%=escape(Application("LocalFolder") + Application("SmallDoc"))%>") + sSubFolder; } fFolder = fso.GetFolder(sPath); fc = new Enumerator(fFolder.files); fileList = ""; var iPosFile; while (!fc.atEnd()) { fs = String(fso.GetFile(fc.item())); iPosFile = fs.lastIndexOf("\\")+1; fs= fs.slice(iPosFile); iPosFile = fs.lastIndexOf(".")+1; ft = fs.slice(iPosFile).toUpperCase(); if ((ft == "TIF") || (((sDocType == '<%=Lan("PABX")%>') || (sDocType == '<%=Lan("FIB")%>')) && ft != "DB")) { if (fileList.length >0) {fileList += ":";} fileList += fs; } fc.moveNext(); } self.parent.displaySmallDocs.location.href="display_small_documents_GUI.asp?retrieve=yes&count=yes&doctype="+sDocType+"&filelist=" + fileList; }
function DisplayFiles() { showStatus("Searching handhole cards..."); self.parent.displaySmallDocs.location.href="/KB/answers/display_small_documents_GUI.asp"?retrieve=yes&count=yes&doctype=<%=sDocType%>&filelist=<%=sFileList%>"; } function encodeSmallDocuments() { var fileList = ""; if ("<%=sRetrieve%>" == "no") { alert("<%=Lan("SRCHNSLCT")%>"); return; } <%for (var i=0; i<rFileList.length;i++) {%> if (checkFile<%=i%>.checked) { if (fileList.length >0) {fileList += ":";} fileList += "<%=rFileList[i]%>"; } <%}%> var sUrl= "select_small_document.asp"; submit_form.action = sUrl; submit_form.target = self.parent.name; submit_form.PARAM_DOC_TYPE.value = "<%=sDocType%>"; submit_form.PARAM_FILE_LIST.value = fileList; submit_form.submit(); } </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)