javascript function not working on asp page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • martyblock
    New Member
    • Jun 2007
    • 1

    javascript function not working on asp page

    i have a piece of javascript code that works fine when starting it form a html page on my harddisk, locally, but trough an asp page this does not work... any suggestions?

    <the bold is where it goes wrong>


    in the head



    </script>
    <script type="text/javascript" language="JavaS cript">

    function ShellRun(cmdlin e, args)
    {
    var WshShell = new ActiveXObject(' WScript.Shell') ;
    var intWindowStyle = 1;
    var bWaitOnReturn = true;
    var quotes = "\"" ;

    cmdline = quotes + cmdline + quotes;
    WshShell.run (cmdline+" "+args ,intWindowStyle , bWaitOnReturn);
    }

    function StartDocReg(sFu llname)
    {
    cmdline="F:\\Ap ps\\WordVBA Shared\\QWord.e xe";
    args = 'L=F S=F M=QDocumentRegE x A2=2 A1=' + sFullname;
    ShellRun(cmdlin e,args);
    }

    </script>


    and in the body



    <FORM name=Form1>
    <INPUT onclick="StartD ocReg('H:\\Test Emil.doc')" type=button value="Launch DocReg" name=ButtonDocR eg>
    </FORM>
    </td>
    </tr>
Working...