Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I'm dynamically building my dropdown (<select option>) with the code something like this:
<select name="1stSelect"><option value="" selected></option>
<script language="javascript">
<% using some java, I loop and populate the description and aName%>
var description= "<%=description%>";
var s = "<%=aName%>";
document.write("<option value='" + description + "&&"+ s+"'>" + description);
<%} %>
</script>
</select>
The problem is I'm using the exact code to populate another select with the same items in the dropdown....
Since I'm looping through a lot of data, I'm wondering, is there a way to build these two selects inside one loop using the above code, to boost the performance?
Thanks a lot.
I'm dynamically building my dropdown (<select option>) with the code something like this:
<select name="1stSelect"><option value="" selected></option>
<script language="javascript">
<% using some java, I loop and populate the description and aName%>
var description= "<%=description%>";
var s = "<%=aName%>";
document.write("<option value='" + description + "&&"+ s+"'>" + description);
<%} %>
</script>
</select>
The problem is I'm using the exact code to populate another select with the same items in the dropdown....
Since I'm looping through a lot of data, I'm wondering, is there a way to build these two selects inside one loop using the above code, to boost the performance?
Thanks a lot.