0

I have a web page containing a textbox. This textbox shows result of processing. There is a button "Save Result" to save contents of textbox to file. I know it can be easily done with FileStream. But I want the same functionality to save file using Javascript so that there is no need for server postback.

Do anybody have solution to this?

Thanks for sharing your time.

3
  • 1
    possible duplicate of Save File From Local Data in Javascript Commented May 7, 2011 at 7:09
  • 1
    Where do you want to save this file to? Server or client? If it is the client, no need to waste your time as you cannot write to the client filesystem using javascript. Commented May 7, 2011 at 7:17
  • @David: I used Downloadify and its working. Thanks Commented May 7, 2011 at 7:39

2 Answers 2

1

As Darin said JavaScript works on the client's side. As far as I know you won't be able to create files on the user computer using javascript.

A little google-ing mentioned it being posible with JScript/ActiveX/IE (Never tried it).But I would suggest a different approach. Good luck!

Sign up to request clarification or add additional context in comments.

Comments

1

You can save it to the client's file system using html5's local storage, however it will only be available to that website.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.