Writing to a shared folder from local machine

nosike

New Member
Hi all,

Please your help urgently.

I am currently having difficulties trying to write to a shared drive on an intranet network in windows vista using javascript FileSystemObject.

the code is as follows:

<html>
<script language='JavaScript'>
function WriteToFile() {
try {
var fs,s;
fso = new ActiveXObject("Scripting.FileSystemObject");
s = fso.CreateTextFile("\\*****\Nosike\\Logfileee.txt " ,8,true);
s.writeline("name|email|location|comments");
s.writeline(document.data.name.value + "|" + document.data.email.value + "|" + document.data.location.value + "|" + document.data.comments.value);
s.Close();
}
catch(err){
var strErr = 'Error:';
strErr += '\nNumber:' + err.number;
strErr += '\nDescription:' + err.description;
document.write(strErr);
}
}

</script>
<body>
<form action="test.hta" method="post" name="data">
Name: <input type = "text" name="name"><br>
Email: <input type="text" name="email"><br>
Location: <input type = "text" name="location"><br>
Comments: <textarea name="comments"> </textarea><br>
<input type=button value="Submit Data" OnClick="WriteToFile(this.form)">
</form>
</body>
</html>


Looking forward to your help.

Thanks
 

My Computer

Last edited:

My Computer

System One

  • Manufacturer/Model
    Lenovo Thinkpad T400
    CPU
    Intel Mobile Core 2 Duo P8700 @ 2.53GHz
    Motherboard
    LENOVO 64734VM
    Memory
    2.00GB Single-Channel DDR3 @ 531MHz
    Graphics Card(s)
    Intel Mobile Intel 4 Series Express Chipset Family
    Sound Card
    Conexant 20561 SmartAudio HD
    Monitor(s) Displays
    15 inch
    Screen Resolution
    1280 x 800
    Hard Drives
    1x 180GB Intel 530 series SSD
    1 x 120GB Hitachi 5400rmp
    1 x 650GB Western Digital Elements 5400rpm
    1x 1Tb Western Digital Elements 5400rpm
    Internet Speed
    Medium for New Zealand
    Other Info
    Weakest part of my computer is the graphics chipset.
    Only ever used a laptop.
    Also use USB Freeview TV Card
    Lenovo Docking Station
    External Speakers
    Other bits a pieces as needed
Back
Top