Sum variable and keep showing and updating it
<p>I have this function, that it's part of my game, and which sends the data to the getScore.php. And in that php I have some code that sends me back the score for every tag that the player enter, like this "100" "50" or "10.
Now I want to grab those scores and sum them and keep showing the player his score (updating), until the game is over.</p>

<pre><code>function showScore() {
    $.ajax({
        type: "GET",
        url: "getScore.php",
        data:{
            tag: $("#tag").val(),
            timecode: curTime,
            filename: getFileName(),
            gameid: gameID()
        }
    }).done(function( msg )
    {
    show3(msg);

    });

    return false; 
};
</code></pre>

<p>The last function is where I show the score, but now I want to change it for sum and show.
How can I do this?!</p>

<pre><code>var score;

function show3(string)
{
document.getElementById('myScore').innerHTML = string;
return string;
}
</code></pre>
