I am trying to figure out how to write a file path to a text file in javascript/html, i.e. in a browser without a server. I have the following piece of html code:
<label class="label">File input</label>
<label for="file" class="input input-file">
<div class="button"><input type="file" id="file" onchange="this.parentNode.nextSibling.value = this.value">Search</div><input type="text" readonly>
</label>
<button type="submit" class="button" onclick=???>Submit</button>
This code already displays the file path in a textfield; however, the main goal is to write this path to a .txt file after clicking submit. I searched the web, but the available scripts are quite complicated. Is there a simple script that enables me to do this? The name of the text file is fixed.
Any help would be very much appreciated.