JavaScript Button Enable and Disable with PHP
<p>I have a while loop that fetches data from a database. I have made three buttons:</p>

<pre><code>&gt; Open  
&gt; Hold   
&gt; Close
</code></pre>

<p>The first time when the page loads, only the open button should be enabled, and the others should be disabled.</p>

<p>After I click the open button, the open button should be disabled,  and the hold and close buttons should be enabled.</p>

<p>I got this result for only one row, but in the while loop not for all the rows.</p>

<p>I have used JavaScript with php.</p>

<p>Example:</p>

<pre><code>function onload()
{
    document.getElementById("Hold").disabled = true;
    document.getElementById("close").disabled = true;
    return false; 
}
</code></pre>

<p>The above code was working for the first row, but I need it to work for all the while loop values.</p>
