I have a script that when you click search it puts money into the script demo
http://www.1234sites.info/333/test.html
But when you refresh the page the money goes away.I want it to stay there.
Any suggestions please and thanks.
here is the code.It is suppose to get stored in the data.txt file.
Thanks
<html>
<head>
<title>Register Yourself</title>
</head>
<script type="text/javascript">
function test()
{
var donation=document.getElementById("test").value;
if (donation == null)
{
donation=0.0000;
}
var newdonation=donation+0.0001;
document.getElementById("test").value=newdonation;
document.getElementById("test").innerHTML="$"+newdonation.toFixed(4);
}
</script>
<body>
<input type="button" value="Search" onClick="test()"/>
<div id="test" value=0>$0.0</div>
<div id="result">
</div>
<!-- end #mainContent -->
</div><!-- end #container -->
</div><script type="text/javascript">var obj = "search";
//Id name to call upData function when clickedvar target = "result";
//Id name of element to display resultvar url = "data.php";
//Url to server processing file data.php$(document).ready(function() { upData(0.000); $("#"+obj).click(function() { upData(0.001); });});function upData(data) { $.ajax({ type: "GET", url: url, data: "action=do&data="+data, success: function(msg) { $("#"+target).html('$'+msg); } });} </script></body></html>