Save the text into a file
Hi All,
I need help with the Javascript this time, where if the user types in a msg in the textArea box, the text has to be stored in the file without prompting the user.
Currently, with my approach, the text will saved into a text file by prompting the user.
Here's the part of my code:
==========
<script type="text/javascript">
function test(){
var jtext = document.getElementById("myTextArea").value;
}
</script>
<textarea id="myTextArea" rows="5" cols="20">
</textarea>
<br>
<br>
<button onclick="javascript:document.execCommand('SaveAs', '1','fileName.txt');">Click to save</Button>
===========
Any guidance would be truely appreciated. Thank you all:)
Regards,
NewBie