I have 3 inputs in a form and i want to save the value of input3 as C:\My Documents\(input1)\(input2).
I've tried using an <execCommand("SaveAs")> script, then use a <document.write(C:\...)> script, but the <document.write> script won't work.
Can anyone help me?

Please help,
Bladerbole

Recommended Answers

All 5 Replies

JavaScript is client-side code. Trying to save files locally violates the browser security model.

Document.write prints to the current HTML page, not to the hard drive, I believe. There is no way to get JavaScript to write anything to a hard drive. You will need to use a server-side language such as PHP or ASP, to save to the server's drive.

Of course, you CAN save your form values in cookies. Not all users have cookies, enabled, but that is exactly what cookies were designed to do.

Do you need help with JavaScript cookie code?

Did this work? Do you need more help? Pleave give us some feedback.

Hi Guys, I'm a brand new user to Dani Web.. I was browsing the web looking for a script somewhat like this one. I hope someone will actually look back at this and reply. Here's my query:

I have a website where people can subscribe to get daily updates. However, I recently decided to do something to boost up my subscription numbers. I decided to give away a free gift to every subscriber. The only thing is that I'm not very good at xml or php, but I know it's doable. I just want to save the addresses and the names of every subscriber. I don't have my own host, therefore I can't install anything. I was just wondering if It's possible. I know I can redirect the form action to a php function where it can create or just edit an xml document and add the strings that were entered in the form, however my form action to subscribe people, therefore I can't change it?

Is it possible to use Javascript to save the values as cookies and then write those cookies in a txt file? I know I need Java to write anything on the hard drive.

Any ideas?

Thank you so much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.