reset selectOneMenu javascript
<p>The following code resets one selectOneMenu through particular id. How to make it dynamic for more selectOneMenus to reset at the top value.</p>

<pre><code>var test= document.getElementById('form1:text3');
 test.options.selectedIndex=0;
</code></pre>

<p>This resets to top value of menu, but how to make it dynamic.</p>

<p>ANy help is appreciated.</p>
