-1

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>
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by peter_budo
0

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

0

@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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.