How to: set the selected "drop down list" value at run time
<p>The pasted below code i am using to create dropdown list and java script for doing some stuffs</p>

<pre><code>&lt;td&gt;
  &lt;select id="currentCustomer" onchange="showSelectedCustomer(this)"&gt;
  &lt;c:forEach var="Customer" items="${listCustomer}" &gt;
      &lt;option value="&lt;c:out value="${Customer}" /&gt;"&gt;&lt;c:out value="${Customer}" /&gt;
      &lt;/option&gt;
 &lt;/c:forEach&gt;
  &lt;/select&gt;
&lt;/td&gt;

function showSelectedCustomer(dropdown) {
var selectedCustomer = dropdown.options[dropdown.selectedIndex].value;
var currentCustomer = document.getElementById('currentCustomer');

 var context = document.forms[0].context.value;
document.forms[0].mode.value = "UPDATE";
document.forms[0].custName.value = dropdown.options[dropdown.selectedIndex].value;
document.forms[0].action=context+"/updateReportDetail.do";
document.forms[0].method="POST";
document.forms[0].submit();
}
</code></pre>

<p>My problem is
 how to set the onselected value dynamically in drop down list.  </p>

<p>Let me explain briefly here,</p>

<p>Initially at the time of logging application the landing "x.JSP" page will display drop down list with multiple customer names with first customer name as selected one by default.
If i select other customer name in drop down list i am calling Javascript[onchage event] to submitting to form and to do some other stuffs in DAO java class for the selected customer and returning back to "x.JSP" page.</p>

<p>Now the thing is i need to set the latest customer name [ie..the customer i processed in DAO java class] as  onselected one in the drop down list.</p>

<p>Help me guys.Thanks for your effort in advance.</p>
