Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
we want to save image in folder using javascript or jquery only.
don't want to write code in cs.
please help.
Posted

Here is the sample code:

XML
<HTML>
<HEAD>

<SCRIPT language="JavaScript">

function WriteFile()
{
   var fso  = new ActiveXObject("Scripting.FileSystemObject");
   var fh = fso.CreateTextFile("c:\\Test.bmp", true);
   fh.WriteLine("Some text goes here...");
   fh.Close();
}

</SCRIPT>
</HEAD>

<BODY>
<P>
<SCRIPT language="JavaScript">  WriteFile(); </SCRIPT>
</P>
</BODY>
</HTML>
 
Share this answer
 
Comments
softprga 29-Mar-12 11:49am    
how to save this text in folder using javascript?
softprga 30-Mar-12 0:29am    
activexobject is not defined error comes
You can't create files using javascript for security reasons.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900