I've made an empty mynote.txt in the same directory,
and open the following code with Internet Explorer,
and allow to write on hard disk (when IE asked)
but nothing in the text file: mynote.txt after the run.
what is the problem?

<html>
<body>

<script type="text/javascript">

function WriteFile()
{
  var fh = fopen("\\mynote.txt", 3);

  if(fh!=-1)
  {
    var str = "Some text goes here...";
    fwrite(fh, str);
    fclose(fh);
  }
}

WriteFile();

</script>

</body>
</html>

Recommended Answers

All 2 Replies

This is the Java forum. Please move this post the the JavaScript forum under Web Development.

@merse For the future please do not double post

@kramerd Instead of advising people to move their post to different section, you may want to use "Flag Bad Post" with short note such as "Please move to XYZ" to let mod/admin team know that a post need their attention

Thread closed, if you wish to follow this question please visit this thread http://www.daniweb.com/forums/post1388823.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.