Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

Don't work style in js. Only 67.0 version (old - OK)

  • 1 odpověď
  • 1 má tento problém
  • 209 zobrazení
  • Poslední odpověď od lvlukola
  • Archivováno

function CallPrint(strid,cstatus) { var formData = new FormData(); formData.append("id", strid); formData.append("getprint", true);

var xhr = new XMLHttpRequest(); xhr.open("POST", "getprintord.php"); // async=true xhr.onload = function (e) { if (xhr.readyState == 4 && xhr.status == 200) { var html = JSON.parse(xhr.responseText)

var prtCSS = '<link rel="stylesheet" href="css/print.css" type="text/css">'; var WinPrint = window.open(,,'left=50,top=50,width=800,height=640,toolbar=0,scrollbars=1,status=0'); WinPrint.document.write(''); WinPrint.document.write('

'); WinPrint.document.write(prtCSS); WinPrint.document.write(html); WinPrint.document.write('
'); WinPrint.document.write(''); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); //WinPrint.close(); } }; xhr.send(formData);

if (cstatus == 3 || cstatus == 4) { document.getElementById("sel_status" + strid).value = "6"; document.getElementById("sel_status" + strid).onchange() } }

function CallPrint(strid,cstatus) { var formData = new FormData(); formData.append("id", strid); formData.append("getprint", true); var xhr = new XMLHttpRequest(); xhr.open("POST", "getprintord.php"); // async=true xhr.onload = function (e) { if (xhr.readyState == 4 && xhr.status == 200) { var html = JSON.parse(xhr.responseText) var prtCSS = '<link rel="stylesheet" href="css/print.css" type="text/css">'; var WinPrint = window.open('','','left=50,top=50,width=800,height=640,toolbar=0,scrollbars=1,status=0'); WinPrint.document.write('<!DOCTYPE html><html lang="ru">'); WinPrint.document.write('<div id="print" class="contentpane">'); WinPrint.document.write(prtCSS); WinPrint.document.write(html); WinPrint.document.write('</div>'); WinPrint.document.write('</html>'); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); //WinPrint.close(); } }; xhr.send(formData); if (cstatus == 3 || cstatus == 4) { document.getElementById("sel_status" + strid).value = "6"; document.getElementById("sel_status" + strid).onchange() } }
Přiložené obrázky

Všechny odpovědi (1)

I solved it this method:

function CallPrint(strid,cstatus) { var formData = new FormData(); formData.append("id", strid); formData.append("getprint", true);

var xhr = new XMLHttpRequest(); xhr.open("POST", "getprintord.php"); // async=true xhr.onload = function (e) { if (xhr.readyState == 4 && xhr.status == 200) { var html = JSON.parse(xhr.responseText) //var prtCSS = '<link rel="stylesheet" href="css/print.css" type="text/css">'; var WinPrint = window.open(,,'left=50,top=50,width=800,height=640,toolbar=0,scrollbars=1,status=0'); WinPrint.document.write(''); WinPrint.document.write(''); WinPrint.document.write('

'); //WinPrint.document.write(prtCSS); WinPrint.document.write(html); WinPrint.document.write('
'); WinPrint.document.write(''); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); WinPrint.close(); } }; xhr.send(formData);