sreya.n 0 Newbie Poster

Hi all,

I want to write some text into a file using javascript.And i am using the following code.But it doesn't work at all.
Can you please help me...

WriteFile();

function WriteFile()
{
    var fh = fopen("c:\\test.txt", 3); // Open the file for writing
    if(fh!=-1) // If the file has been successfully opened
    {
        var str = "Some text goes here...";
        fwrite(fh, str); // Write the string to a file
        fclose(fh); // Close the file
    }

}

Thanx a lot...