I have a shared path for a PDF file. if i paste the path in address bar,the file opens in all browser perfectly. Below code working fine in IE 8, but not in Chrome and Firefox
Code:
function openPDF(file) { window.open(file, '_blank'); }
function linkFormatter(cellvalue, options, rowObject) {
if ($.trim(cellvalue) == "" || cellvalue == null)
return $.trim(cellvalue);
else
return '<a href="#" onclick="openPDF(\'file:' + rowObject["URL"].replace(/\\/g, "/") + cellvalue + '\')" >' + cellvalue + '</a>';
}
I am using this code in JQgrid
to make link column.
Kindly help on this to make that working in all browsers.