I Want to print to default printer without showing dialogbox of window.print()..so that i had searched on google and i got a code as below:
if (navigator.appName == "Netscape") {
//"Microsoft Internet Explorer"
var PrintCommand = '<object ID="PrintCommandObject" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>';
document.body.insertAdjacentHTML('beforeEnd', PrintCommand);
PrintCommandObject.ExecWB(6, -1);
PrintCommandObject.outerHTML = "";
}
else {
window.print();
}
but it showing error that .. " PrintCommandObject.ExecWB is not a function "..
How can i resolve it...please help me.