0

A few days ago I started to build a "Talk To Us Page" In c#.

So, I did a few buttons and text arena options..

And it was easy as C# should be. You just use a system IO or any thing and write to files..

I tried to do some thing very similarly with JS\jQuery and had no idea how to do so.

I looked around google a bit, and found nothing. Really, found about 30 people who are saying things that are really not working.

And I have to do is write a few lines of text from textbox..

The textboxes look like this:

<input type="text" name="">

<input type="text" name="">

and when you clicked of a button it will write it all down to a file in driver c, or anything like that.

I really thinks its not that hard, but I need a hand.

Please help me. thanks!

1
  • You could use HTML 5's DB capabilities. Commented Sep 25, 2011 at 13:20

3 Answers 3

3

and when you clicked of a button it will write it all down to a file in driver c, or anything like that.

Forget about it. For security reasons javascript that runs in a browser has no access to client and server files. Just think of the consequences if this was possible. You visit some site on the internet and all of a sudden files start to popup up and out of existence from your hard drive. Definitely something that should be forbidden.

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

4 Comments

We are talking about wiring to the server local files. not the client. is that posibal ?
@Alon M, with pure javascript it's impossible. You could send an AJAX request to some server side script which will then write to the files. But you need a server side language.
So. you are saying not js and not jqury can do so. 100% sure?:) and not to DataBase..right?
@Alon M, you can use of course javascript and jquery to send the AJAX request to your server side script, but that's where it ends. The actual writing on the file must be done on the server.
0

Outside of Internet Explorer, you cannot use JavaScript to write to the local file system. This is a security feature of the sandbox in which in-browser JS runs.

Comments

0

javascript cant access the files contents, atleat on the client machine.

here is a helpful link http://en.wikipedia.org/wiki/JavaScript#Security

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.