user312846
user312846

Reputation: 1

How to create a file by getting the filename from the user in javascript?

How to create a file by getting the filename from the user in javascript?

Upvotes: 0

Views: 105

Answers (3)

James Westgate
James Westgate

Reputation: 11464

Im guessing here that you want to use ?

Upvotes: 0

lugte098
lugte098

Reputation: 2309

Since javascript is a client-side language, you cannot create a file on the server using javascript alone. Probably the best thing to do is POST the variable with the filename to a PHP file.

Upvotes: 1

Stomped
Stomped

Reputation: 2100

Some more information might prove helpful, but if I take your question at face value the answer is "You can't".

Javascript run in the browser from a website (the most common way) has no access to the desktop and can't create a file on it.

Upvotes: 0

Related Questions