How to write files on a server with JavaScript?
<p>Environment: network, where each client is connected to a server. Internet access is disabled. The server cannot run server-side scripting languages or similar things, it can only be used to host files. [You know, the school server.]<br>
Context: a chat which just shows a page (<code>chat.html</code>) which people edit in order to write a message. Simplified code:  </p>

<pre><code>&lt;meta http-equiv="refresh" content="1"&gt;
&lt;iframe src="chat.html"&gt;
</code></pre>

<p>Problem: editing may overwrite precedent edits.<br>
Additional notices: The clients are (theorically) not allowed to run external programs.  </p>

<p>The solution I thought about is the following: making a <code>&lt;form&gt;</code> which, once you send the message, edits <code>chat.html</code>, appends the message and closes the file. The problem is that I don't know how to open files. Also, I cannot use libraries like jQuery and so on, because the computer is "closed" (cannot access the Internet, nor download files from an USB drive).<br>
What have I tried so far: Googled a while, but no solutions for opening files. <em>Quite</em> the same for SO: JS cannot access <em>local</em> files due to safety issues, but nothing about accessing files on servers.</p>
