I've used the following code to imitate a direct print to a printer using javascript. The terminology may not be sound but the code works. Hopefully this will help someone out there looking to print to a printer "directly". If you have a better alternative approach, what keep you from getting back sooner?
:
================================================
// Set the frames source, basically your HTML
// page holding the javascript will be in one
// frame while this one will hold the data to
// print. Set the javascript page to be 100%
// width and the data page frame to be 0%
//==============================================
var purchasetxt = print_items.arguments[0];
window.parent.frames['display'].src = purchasetxt;
//=== Obtain the data frame object
upper_object = window.parent.frames['display'];
//=== Create a Web Browser Object
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
//=== Insert the Web Browser Object into
//=== the second frame's window upper_object.document.body.insertAdjacentHTML('beforeend', WebBrowser);
//=== Set focus to the second frame (i.e. data
//=== frame)
upper_object.focus();
//=== Execute the Web Browser Object upper_object.document.WebBrowser1.ExecWB(6,-1);
//=== Get rid of the Embedded Web Browser Object upper_object.document.WebBrowser1.outerHTML = "";
=================================================