The Idea:
I need JavaScript to create a blank file, and then populates it with some data on the clients computer - is this possible (automatically, or with prompting window of some kind - for user to allow this file creation),
and if there is can it of any extension.
Else ( Can, after php creates the file, javascript deploy that file ).
Any ideas and code snippets or reference referencing are welcome, thanks !
Can JavaScript create a file ?
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
...
Ok, but my idea is based on the following:
Javascript can execute some file, can it pass some argument for that file to be executed (like copy / paste to clipboard),
so I run notepad, and insert data, and save the file - .... to desired location or to internet temporary files ...
The other way I planned is to prompt - or tell my users to create / save the file, anywhere on the hard-disk and when they log in again, my site (I don't know how
should automatically call the contents of that file - for personalisation purpose.
Is this possible - in theory, I'm solving that problem now, the code is not neccecary - I have to do something on my own, right
.
Tnks Ahd !
Javascript can execute some file, can it pass some argument for that file to be executed (like copy / paste to clipboard),
so I run notepad, and insert data, and save the file - .... to desired location or to internet temporary files ...
The other way I planned is to prompt - or tell my users to create / save the file, anywhere on the hard-disk and when they log in again, my site (I don't know how
Is this possible - in theory, I'm solving that problem now, the code is not neccecary - I have to do something on my own, right
Tnks Ahd !
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
why do you keep insisting on storing this data on their machine? We've told you many times now, use a database to store the information.
It's not possible for Javascript to access any file in the filesystem. Javascript can only access the content available through the page(s) it sits on or around.
Your server cannot pull a file from a remote location without that remote location (someone's computer) being either directly networked to the server or the remote location being a server in itself.
It's not possible for Javascript to access any file in the filesystem. Javascript can only access the content available through the page(s) it sits on or around.
Your server cannot pull a file from a remote location without that remote location (someone's computer) being either directly networked to the server or the remote location being a server in itself.