javascript keeping count on how many times a picture is deleted
<p>I never used javascript in this way, but I would like to keep track of how many times a delete button is pressed. When the page originally loads I want to set the "value" to 0 and as they press delete keep track. Here is what I have is what obviously does not work, I didnt want to go the route of making a hidden variable and keep track that way. Thanks for any help.</p>

<p>Script</p>

<pre><code>var deletePictureCount;
function MenuAction() {

}
MenuAction.prototype = {
    GetDeletePictureCount: function () {
        if (deletePictureCount == null || deletePictureCount &lt; 0) { return 0; }
        return deletePictureCount;
    },
    SetDeletePictureCount: function () {
        deletePictureCount++;
    }
};
</code></pre>

<p>usage on delete</p>

<pre><code> var incement = new MenuAction().SetDeletePictureCount();
</code></pre>

<p>usage when trying to get value back</p>

<pre><code> var deletedPiccount = new MenuAction().GetDeletePictureCount();
</code></pre>
