IrfanRaza
IrfanRaza

Reputation: 3058

How to save textbox data to file using javascript

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.

Upvotes: 0

Views: 735

Answers (2)

Variant
Variant

Reputation: 17365

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

Upvotes: 1

Fernando
Fernando

Reputation: 68

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!

Upvotes: 1

Related Questions