I have 2 text boxes. If you click on the first, a list box appears below it and you make a selection. In theory, when you click on the second, it should show a list box below it and you make a selection. The first list box is fine, but when you select from the second, not only does the second list box appear, but also the first one. Which I do not want. I tried setting the visibily to invisible for the first one when it is selcted, but that isn't really what I want to do. I basically copy and pasted the second part of code and changed all references to the original, so I don't know why that still displays when I click the the second list. I hope this makes sense.
<input type="hidden" name="hdnSort" value="<%=lblnsort%>"/>
<input type="hidden" name="hdnMode" id="hdnMode"/>
<tr class="contentPart">
<td align="left" width="15%">Select Customer:</td>
<td align="left" width="13%"> </td>
<td align="left">
<input type="text" name="txtCustomer" id="txtCustomer" class = "txtCustPOMaint"
onKeyup="CustomerKeyIn(this);" tabindex="7"
autocomplete="off" onblur="fnblur()" onfocus="fnselect()" style="width:491px;"
size="65" value=""/>
<input type="button" id ="btnResort" name="btnResort" value="Resort" class="buttonpart"
onclick="fnSort();" tabindex="15"/>
</td>
</tr>
<tr class="content">
<td align="left" width="15%"> </td>
<td align="left" width="13%"> </td>
<td align="left">
<div id="divCustomerGroup" name="divCustomerGroup"
style="position:absolute; width:188px; height:95px; z-index:1; top: 90px; visibility:hidden;">
<select name="lstCustomerInfo" name="lstCustomerInfo" id="lstCustomerInfo" size="5"
onclick="fnclick()" onChange="LoadValues()" style = "width:491px;font-family:courier new">
<option Value = "INV">
Name | ARG# | PRISM# | US/CA
</option>
<%
Set loCustMaint = CreateObject("BusCustMaint.clsbusCustomerMaint")
Set lrsCustRecord = CreateObject("Adodb.Recordset")
Set lrsCustRecord = loCustMaint.GetCustomerList(lblnsort,lsUserId)
If Not lrsCustRecord.EOF Then
While not lrsCustRecord.EOF
lsconcatvalue1 = InsertSpace(lrsCustRecord(0))
lsconcatvalue2 = trim(lrsCustRecord(1) &"")
lsconcatvalue3 = ltrim(lrsCustRecord(2) &"")
lsconcatvalue4 = trim(lrsCustRecord(3) &"")
lsConcatvalue = lsconcatvalue1 &" | "& lsconcatvalue3 &" | "& lsconcatvalue2 &" | " & lsconcatvalue4
%>
<option value=<%=lsconcatvalue2%>
<% If Trim(lsCustomer) = lsconcatvalue2 Then
Response.write " Selected"
End If%>
>
<%=lsConcatvalue%>
</option>
<%lrsCustRecord.MoveNext
Wend
End If
'Destroy Objects
Set lrsCustRecord = Nothing
Set loCustMaint = Nothing
%>
</select>
</div>
</td>
</tr>
<%
' 1260Drop Down List.
%>
<input type="hidden" name="hdnSort2" value="<%=lblnsort2%>"/>
<input type="hidden" name="hdnMode2" id="hdnMode2"/>
<tr class="contentPart">
<td align="left" width="15%">Select 1260:</td>
<td align="left" width="13%"> </td>
<td align="left">
<input type="text" name="txtCustomer1260" id="txtCustomer1260" class = "txtCustPOMaint1260"
onKeyup="Customer1260KeyIn(this);" tabindex="7"
autocomplete="off" onblur="fnblur2()" onfocus="fnselect2()" style="width:491px;"
size="65" value=""/>
<input type="button" id ="btnResort2" name="btnResort2" value="Resort" class="buttonpart2"
onclick="fnSort2();" tabindex="15"/>
</td>
</tr>
<tr class="content">
<td align="left" width="15%"> </td>
<td align="left" width="13%"> </td>
<td align="left">
<div id="divCustomer1260" name="divCustomer1260"
style="position:absolute; width:188px; height:95px; z-index:2; top: 130px; visibility:hidden;">
<select name="lstCustomer1260" name="lstCustomer1260" id="lstCustomer1260" size="5"
onclick="fnclick2()" onChange="LoadValues2()" style = "width:491px;font-family:courier new">
<option Value = "INV">
Name | ARG# | PRISM# | US/CA
</option>
</select>
</div>
</td>
</tr>
<%
<input type="hidden" name="hdnSort" value="<%=lblnsort%>"/>
<input type="hidden" name="hdnMode" id="hdnMode"/>
<tr class="contentPart">
<td align="left" width="15%">Select Customer:</td>
<td align="left" width="13%"> </td>
<td align="left">
<input type="text" name="txtCustomer" id="txtCustomer" class = "txtCustPOMaint"
onKeyup="CustomerKeyIn(this);" tabindex="7"
autocomplete="off" onblur="fnblur()" onfocus="fnselect()" style="width:491px;"
size="65" value=""/>
<input type="button" id ="btnResort" name="btnResort" value="Resort" class="buttonpart"
onclick="fnSort();" tabindex="15"/>
</td>
</tr>
<tr class="content">
<td align="left" width="15%"> </td>
<td align="left" width="13%"> </td>
<td align="left">
<div id="divCustomerGroup" name="divCustomerGroup"
style="position:absolute; width:188px; height:95px; z-index:1; top: 90px; visibility:hidden;">
<select name="lstCustomerInfo" name="lstCustomerInfo" id="lstCustomerInfo" size="5"
onclick="fnclick()" onChange="LoadValues()" style = "width:491px;font-family:courier new">
<option Value = "INV">
Name | ARG# | PRISM# | US/CA
</option>
<%
Set loCustMaint = CreateObject("BusCustMaint.clsbusCustomerMaint")
Set lrsCustRecord = CreateObject("Adodb.Recordset")
Set lrsCustRecord = loCustMaint.GetCustomerList(lblnsort,lsUserId)
If Not lrsCustRecord.EOF Then
While not lrsCustRecord.EOF
lsconcatvalue1 = InsertSpace(lrsCustRecord(0))
lsconcatvalue2 = trim(lrsCustRecord(1) &"")
lsconcatvalue3 = ltrim(lrsCustRecord(2) &"")
lsconcatvalue4 = trim(lrsCustRecord(3) &"")
lsConcatvalue = lsconcatvalue1 &" | "& lsconcatvalue3 &" | "& lsconcatvalue2 &" | " & lsconcatvalue4
%>
<option value=<%=lsconcatvalue2%>
<% If Trim(lsCustomer) = lsconcatvalue2 Then
Response.write " Selected"
End If%>
>
<%=lsConcatvalue%>
</option>
<%lrsCustRecord.MoveNext
Wend
End If
'Destroy Objects
Set lrsCustRecord = Nothing
Set loCustMaint = Nothing
%>
</select>
</div>
</td>
</tr>
<%
' 1260Drop Down List.
%>
<input type="hidden" name="hdnSort2" value="<%=lblnsort2%>"/>
<input type="hidden" name="hdnMode2" id="hdnMode2"/>
<tr class="contentPart">
<td align="left" width="15%">Select 1260:</td>
<td align="left" width="13%"> </td>
<td align="left">
<input type="text" name="txtCustomer1260" id="txtCustomer1260" class = "txtCustPOMaint1260"
onKeyup="Customer1260KeyIn(this);" tabindex="7"
autocomplete="off" onblur="fnblur2()" onfocus="fnselect2()" style="width:491px;"
size="65" value=""/>
<input type="button" id ="btnResort2" name="btnResort2" value="Resort" class="buttonpart2"
onclick="fnSort2();" tabindex="15"/>
</td>
</tr>
<tr class="content">
<td align="left" width="15%"> </td>
<td align="left" width="13%"> </td>
<td align="left">
<div id="divCustomer1260" name="divCustomer1260"
style="position:absolute; width:188px; height:95px; z-index:2; top: 130px; visibility:hidden;">
<select name="lstCustomer1260" name="lstCustomer1260" id="lstCustomer1260" size="5"
onclick="fnclick2()" onChange="LoadValues2()" style = "width:491px;font-family:courier new">
<option Value = "INV">
Name | ARG# | PRISM# | US/CA
</option>
</select>
</div>
</td>
</tr>
<%