Code 0: Access is denied message on attempted file read

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • februs@wk.net

    #1

    Code 0: Access is denied message on attempted file read

    Was just trying a small script to load a file and while it works if I
    run it locally on my own pc if I try and access it on a remote web
    server it generates an error code 0: Access is denied in IE:

    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="JavaS cript">
    <!-- Begin
    function whatFile() {
    window.location = 'file:///' + document.form1. cmuds.value;
    }
    // End -->
    </script>
    </HEAD>

    <BODY>

    <form name=form1>
    <input type=file name="cmuds">
    <input type=button onClick="whatFi le()" value="Open File">
    </form>

    </BODY>
    </HTML>

    I am trying to load the same local (text) file in each case. Anyone
    know what the problem is and whether I can get round it ?

    Thanks

  • Mick White

    #2
    Re: Code 0: Access is denied message on attempted file read

    februs@wk.net wrote:
    [color=blue]
    > Was just trying a small script to load a file and while it works if I
    > run it locally on my own pc if I try and access it on a remote web
    > server it generates an error code 0: Access is denied in IE:
    >
    > <HTML>
    > <HEAD>
    > <SCRIPT LANGUAGE="JavaS cript">
    > <!-- Begin
    > function whatFile() {
    > window.location = 'file:///' + document.form1. cmuds.value;
    > }
    > // End -->
    > </script>
    > </HEAD>
    >
    > <BODY>
    >
    > <form name=form1>
    > <input type=file name="cmuds">
    > <input type=button onClick="whatFi le()" value="Open File">
    > </form>
    >
    > </BODY>
    > </HTML>
    >
    > I am trying to load the same local (text) file in each case. Anyone
    > know what the problem is and whether I can get round it ?
    >[/color]
    You need access to local files. And client-side js doesn't; well, not
    without jumping through hoops.
    Mick

    Comment

    • lkrubner@geocities.com

      #3
      Re: Code 0: Access is denied message on attempted file read

      Is that true even the server is Windows? Is there a way to use Windows
      host script interpreter to allow server side JS?

      Comment

      • Mick White

        #4
        Re: Code 0: Access is denied message on attempted file read

        lkrubner@geocit ies.com wrote:
        [color=blue]
        > Is that true even the server is Windows? Is there a way to use Windows
        > host script interpreter to allow server side JS?
        >[/color]
        Both the server and the client *may* allow javascript.
        Mick

        Comment

        Working...