Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: how i can save a textarea text in txt file using execCommand('SaveAs'),


Message #1 by ejaz@p... on Mon, 22 Jul 2002 05:11:17
> <html>
<> head>
<> script>
f> unction save()
{> 
	> str = document.forms[0].textarea.value;
	> mydoc = document.open();
	> mydoc.write(str);
	> mydoc.execCommand("saveAs",true,"mydocument.txt");
	> mydoc.close();
}> 
<> /script>
<> /head>
<> body>
<> form>
<> textarea name="textarea"></textarea>
<> input type="button" value="save" onclick="save()">
<> /form>

<> /body>
<> /html>
<font color=red>Thanx a lot! its working now</font>

  Return to Index