Save Dat file at client side

Whing Dela Cruz
Whing Dela Cruz used Ask the Experts™
on
Hi experts, I want to save dat file locally. Is this possible that the client side could save dat file? If not please give me  idea why? Thank you!

<!doctype html>
<html>
<body>
<form action="save.asp" method="post">
    <label for="textboxdata">Enter a message</label>
    <textarea id="textboxdata" name="textboxdata"></textarea>
    <input type="submit" value="Save locally"/>
    <p>
        <label>Name of the Dat</label>
          	    <input ype = "text"
                 	        id = "mydatName"
                 	    value = "fortune"
                            name="filename"
			            size="10"
                </
    </p>
</form>
</body>
</html>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
No, that won't be possible due to security reasons.

However, if you are open for HTML5, which is supported in limited versions of the browsers, you can look into local storage feature.

Author

Commented:
Okey sir, what about a response from the server and save to client automatically. Example a message from the server and I want to save it to client pc to C:/sample. Is this the same not possible?

response.write(rs("messages")) //Save this message as .txt to C:/sample
Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
You can not download a file from the server or upload a file to the server automatically.  There must be a 'user action' to initiate either of them.  That is a security barrier to prevent malware from the server from getting to your local files.
Big MontyWeb Ninja at large

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial