HTML write file on web server RRS feed

  • Question

  • Not sure if posted on correct forum section. Please someone help move to the correct section.

    Just a simple HTML file on WebServer1 C:\inetpub\wwwroot\Test\index.html and it did not work.


    What is your name?<br />
    <form name="frm1"  onsubmit="greeting(fname, lname)">
    <input type="text" name="fname" id="firstName"/>:<input type="text" name="lname" id="lastName"/>
    <input type="submit" value="Submit" />

    <script type="text/javascript">
    function greeting(firstname, lastname){
       set fso = CreateObject("Scripting.FileSystemObject"); 
       set s   = fso.CreateTextFile("C:\inetpub\wwwroot\Test\Name.txt", True);  
       s.writeline("First Name :" + firstname.value);
       s.writeline("Last Name :" + lastname.value);
    } </script>


    Q1: seems line "set fso = CreateObject(.....)"  undefined. Please help correct the lines.

    Q2: how to make network user http://webserver1/Test  to save file on server side?


    Wednesday, September 19, 2018 1:46 PM

All replies