Im building a small website and ive run into a problem i want to save a number that is hardcoded to a .txt file on the press of a button.
Ive already tried some examples online from other website but the only time i could same smthing was when i use php and it wasnt on a button press
...
<br>
<br><table id="tblCustomers" style="width: 100%;">
<tr>
<td style="width: 50%;">
<button onclick="location.href='{% url 'script'
%}'">Execute Script</button> <hr>
//On this button it should save a 23 to a txt
file wich is in the same folder and has the
name contacts.txt
</td>
<td style="width: 50%;"><input type="button"
id="btnread" value="Count Rows" /></td>
</tr>
</table>
...
this is something else i tried it doesnt work ether.