Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Script Error in CD Autorun

    Thanks in advance for everyone's help in this thread

    I have a CD full of medical information and X-rays, MRI's, etc.
    The auto run opens a webpage that says "click below to login". Clicking the button produces the error:

    Script Error
    An error has occurred in the script on this page.
    Line: 15
    Char: 3
    Error: Invalid argument
    Code:0
    file:///D:/Autorun.hta

    Do you want to continue running scripts on this page?


    Clicking yes or no both produce no effect. Can you please look over the code and let me know if there is anything I can do to fix this problem? The source code of the autorun browser is:

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <title>PACS Export - Confidential - Provided by UPMC</title>

    <SCRIPT LANGUAGE="JavaScript">
    function resize()
    {
    window.resizeTo("433","270");
    }
    function goStentor()
    {
    //alert( "Launching Stentor Image Viewer.\nChoose 'open' from the next window.\nUse a blank password when prompted." );
    linkStentor.click();
    }
    function goDICOM()
    {
    linkDICOM.click();
    }
    </SCRIPT>

    </head>

    <body onload="resize();" style="overflow:hidden" bgcolor="#39607D" link="#66ccff" vlink="#66ccff" alink="#66ccff" text="#ffffff">

    <table cellpadding="0" cellspacing="0" id="main" width="400" height="200" border="0">
    <tr>
    <td align="center" >
    <img border="0" src="Banner.gif" width="384" height="71">
    </td>
    </tr>
    <tr>
    <td align="center">
    <input type="button" width="395" value=" View Images in Stentor " name="btnStentor" onclick="goStentor();">
    <a href="./Stentor/iSiteMediaViewer.exe" id="linkStentor" name="linkStentor"/></a><font size="-2"><br>( Use a blank password to login. )</font>
    </td>
    </tr>
    <tr>
    <td align="center">
    <font face="verdana" size="1">
    <!--<a href="./Stentor/Help/CDGettingStarted.htm">Help using Stentor iSite CD Direct</a> |
    <a href="./Stentor/Help/CDGettingStarted.htm">Stentor Help</a>-->
    </font>
    </td>
    </tr>
    </table>

    </body>

    </html>



    Thanks again for your help.
    ~a45b22chp

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    I copied and pasted your source code into my local file and named it with .hta extension and I didn't see the error you described. I can only see the "Cannot find file" error message which is expected because I don't have the .exe file.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,232
    Thanks
    80
    Thanked 4,456 Times in 4,421 Posts
    Ditto for me.

    Just a comment that all the ugly gobbledygook with JavaScript is completely unnecessary. The following simplified code does the same thing:
    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <title>PACS Export - Confidential - Provided by UPMC</title>
    </head>
    
    <body onload="window.resizeTo(433,270);" 
          style="overflow:hidden" bgcolor="#39607D" link="#66ccff" vlink="#66ccff" alink="#66ccff" text="#ffffff">
    
    <table cellpadding="0" cellspacing="0" id="main" width="400" height="200" border="0">
    <tr>
        <th>
            <img border="0" src="Banner.gif" width="384" height="71">
        </th>
    </tr>
    <tr>
        <th>
            <form action="./Stentor/iSiteMediaViewer.exe">
                <input type="submit" width="395" value=" View Images in Stentor ">
            </form>
            <br>( Use a blank password to login. )
        </th>
    </tr>
    </table>
    </body>
    </html>
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you, Old Pedant. The source code is on the CD so it is not rewritable. How do I take the code you provided me and run it? I understand that I will have to change

    "./Stentor/iSiteMediaViewer.exe"
    to
    "D://Stentor/iSiteMediaViewer.exe"

    Thanks for your timely help.

  • #5
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resolved

    Nevermind. I simply entered "D://Stentor/iSiteMediaViewer.exe" into Command Prompt and it worked.

    Thanks again though for your support.

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    It's better to use a relative path than an absolute path. Not all CD drives are at D:
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •