1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Rep Power

    Java script to send DOS print command

    I'm attempting to print to a Zebra printer (barcode) by taking the results of an .asp page and sending the output to the Zebra printer, which will interpret the output / embedded Zebra Program Language (ZPL). Thus, printing the output at runtime.

    Does anyone know how to send a dos command with a java script from an .asp page that will send the .asp result output to a notepad file then send the notepad file to the printer at run-time?

    I tried a few scripts, but nothing worked.

    <SCRIPT LANGUAGE='JavaScript'>

    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6,-1); WebBrowser1.outerHTML = "";


    The script works in Win2K/IE6.0, but craps out on XP an box. Encounters an unreconized object error. Verified and checked all settings.

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    No es importante
    Rep Power
    Use the Windows Script Host commands.

IMN logo majestic logo threadwatch logo seochat tools logo