У меня есть требование о печати документов, и я использую ScriptX для этой цели. Все работает нормально и печатает документы в IE11. Но в IE8 я получаю сообщение об ошибке: Ошибка: значение свойства '$' равно null или undefined, а не объект Function.Функция ScriptX Print не работает в IE8
Мой печати код выглядит следующим образом
function PrintFunctionality(url, title,data)
{
if (!!navigator.userAgent.match(/Trident\/7\./)) {
//alert('ie browser');
var printWindow = window.open('', '', 'height=400,width=800');
var htmltext = '<html><head><title>' + title + '</title>';
htmltext += "<object id='factory' style='display:none' classid='clsid:1663ed61-23eb-11d2-b92f-008048fdd814' codebase='http://localhost/smsx.cab#Version=7,5,0,20'></object>";
htmltext += "<script src='http://localhost/jquery-1.8.2.min.js'></script>";
htmltext += "<script src='http://localhost/meadco-scriptx-1.0.2.js' type='text/javascript'></script>";
htmltext += "<script type='text/javascript'>";
htmltext += "$(function() {";
htmltext += "if (MeadCo.ScriptX.Init()) {MeadCo.ScriptX.PrintPage(false);}});</script>";
htmltext += '</head><body>';
htmltext += data;
htmltext += '</body></html>';
printWindow.document.write(htmltext);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
return false;
}
};
и установленную версию сценария х в моей системе:
Установленная версия ScriptX является: 7.5.0.20
Установленная версия диспетчера безопасности: 7.5.0.20
Установленная версия компонента печати: 7.5.0.20
Любая вещь для изменения кода для работы в IE8?