Click here to Skip to main content
14,775,228 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a local web page to play game of Tic Tac Toe. The game is written in Javascript. it is working fine. Now i want to save the score to an XML file (or text or any other file type). Can anyone help me doing this? I have already tried some scripts but not working fine.
Thanks in advance.

When run in a web browser, JavaScript executes in a sandboxed environment. you won't be able to save the score to anything other than a cookie without using a web service call, activex component or some other extra bit of software.
Manas Bhardwaj 31-Jan-11 10:10am
+5. Didnt notice tht you already posted .:)
sapien4u 1-Feb-11 1:22am
Thank you for your post.
Is there any simple method to implement this thing?
I just want to store the scores of different players and club them to show who is the best player.
jim lahey 1-Feb-11 2:58am
You've already mentioned jQuery.. have a look at making an AJAX or JSON post to a webservice with jQuery
sapien4u 1-Feb-11 4:15am
Can you share some sample code?
jim lahey 1-Feb-11 9:47am explains it far better than I will ever be able to. have a look at for webservice stuff.
Javascript has no write access to your file system. Why dont you write it in a cookie?

Another option would be to go for an ActiveX contol.
sapien4u 1-Feb-11 1:23am
Thank you for your post.
I have tried with ActiveX but it is not working.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900