By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,730 Members | 1,648 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,730 IT Pros & Developers. It's quick & easy.

How to save in a data file on server with Javascript

P: 3
Hi I have one question that has been bugging me all day and no one helped me whenever i asked them :)
OK....
On my web site whenever you visit it I have a prompt message that ask you for your name.

This is the script:

<script type="text/javascript">

var name = prompt("Please enter your name","")

</script>


I want whenever the visitor enters thier name and click OK to continue to the web site their name to saves in a data file in my private space, so whenever i go to my private space and open that data file to see who visited my web site.

Can someone help me how to do this script????

Thank You :)
Jul 4 '06 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
That will not be possible with JavaScript alone. To save to a private space, you need server-side code. One way to achieve this is to make an Ajax request to a server-side script which saves the name.

A note on prompts: these are annoying on page load - they should be triggered by the user, not forced on them.
Apr 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.