Allow value -1 when clicking on a button and link, but just one time (the first time clicked upon) without disabling the button/link
<p>I have the following script:</p>

<pre><code>&lt;script language=javascript&gt;
    function process(v){
        var value = parseInt(document.getElementById('v').value);
        value+=v;
        document.getElementById('v').value = value;
    }
&lt;/script&gt;


&lt;input type=test size=10 id='v' name='v' value='3'&gt;
&lt;input type=button value='-' onclick='javascript:process(-1)'&gt;
&lt;a id="v" href="#" onclick='javascript:process(-1)'&gt;minus&lt;/a&gt;
</code></pre>

<p>If you click the button, it will deduct 1 from the total amount (3). The same applies for the minus-link. Now this all works great. </p>

<p>The problem is that I want to allow each one to deduct 1, just one time. Without disabling the button/link.</p>

<p>Example what I need:
So I click the button: 3 -> 2. 
Now I click the button again, nothing will happen 2 stays 2. 
Now I click the minus-link, 2 -> 1. 
Clicking the link again, nothing will happen 1 stays 1</p>

<p>This can all be mixed of course. The main thing is, they each are allowed to do the -1 just one time (the first time clicked upon).</p>

<p>How to do this?</p>

<p>Kind regards,
Maurice</p>
