function downloadFiles() { var strBrowserVersion; var strBrowser; var strFilename; strBrowser = GetBrowserName(); strBrowserVersion = GetBrowserVersion(); for (var i = 0; i < arguments.length; i++) { strFilename = arguments[i]; if ((strBrowser == 'Chrome') || (strBrowser == 'Firefox' && strBrowserVersion >= 20)) { //var link = document.createElement('a'); // //link.href = strFilename; //link.download = '';//value.replace('Uploads', '').replace('-', ''); //link.click(); window.open(strFilename, '', 'width=700,height=500'); } else { window.open(strFilename, '', 'width=700,height=500'); } } return false; } function GetBrowserName() { var N = navigator.appName, ua = navigator.userAgent, tem; var M = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if (M && (tem = ua.match(/version\/([\.\d]+)/i)) != null) M[2] = tem[1]; M = M ? [M[1], M[2]] : [N, navigator.appVersion, '-?']; return M[0]; } function GetBrowserVersion() { var N = navigator.appName, ua = navigator.userAgent, tem; var M = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if (M && (tem = ua.match(/version\/([\.\d]+)/i)) != null) M[2] = tem[1]; M = M ? [M[1], M[2]] : [N, navigator.appVersion, '-?']; return M[1]; }