What I need is to slowly increase the score from 0 to the final score say 150, in the mean while change other values as of required.
This is bieng done to inrease the friendliness of the game and make it more fun with the suspense of total score till the end.(say in 20 seconds)
I was using AJAX for it, I can store the values in a PHP Array and then display it, so anyways any help in this regard and i would be very grateful to you.
Thanks in advance
Expand|Select|Wrap|Line Numbers
- function do_ajax(div,i)
- {
- var ajax = new Ajax();
- ajax.responseType = Ajax.FBML;
- ajax.ondone = function(data)
- {
- document.getElementById(div).setInnerFBML(data);
- }
- var params={"over":i}; //add parameters as comma separated "param":value
- ajax.post("http://abcd.com/ajax.php?t=test",params);
- if(i<20)
- {
- RefreshAjax(div,i);
- }
- else
- return 1;
- }
- function RefreshAjax(div,i)
- {
- i++;
- setTimeout(function() {do_ajax(div,i)}, 1200);
- }