Results 1 to 4 of 4
Thread: Save the text into a file
- 05-12-2011, 03:16 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
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
- 05-12-2011, 03:20 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
JavaScript is to java as ham is to hamster.
Entirely different languages, you would probably get more help on a java script forum.
- 05-13-2011, 02:31 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Okay..sure. Thank you.
- 05-13-2011, 02:43 AM #4
Similar Threads
-
How can I save the content of textfield in a text file?
By fred in forum Java AppletsReplies: 7Last Post: 08-17-2010, 06:00 PM -
GUI: How to save these data to a text/dat file?
By florachu2121 in forum New To JavaReplies: 6Last Post: 08-01-2010, 11:31 PM -
Edit/Save Text File - Problems
By ryanlbowen in forum New To JavaReplies: 9Last Post: 07-20-2009, 05:23 PM -
save text into xml in java
By Omarero in forum New To JavaReplies: 8Last Post: 10-26-2008, 02:19 AM -
Simple: Text to an image & save.
By cilaes in forum Java 2DReplies: 4Last Post: 09-06-2008, 06:16 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks