View Single Post
  #19 (permalink)  
Old November 4th, 2004, 03:36 AM
deeoo deeoo is offline
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the solution!!!!

Dim varMaxLength
varMaxLength = 0
deel1 = 0
While (NOT oDynaListRS.EOF)

 If (varCheckGroup <> oDynaListRS.Fields.Item(txtDynaListRelation).Value ) Then
  If (varCheckLength > varMaxLength) Then
   varMaxLength = varCheckLength
  End If
  varCheckLength = 0
 End If
if (oDynaListRS.Fields.Item(txtDynaListValue).Value) = (rs(txtDynaListValue)) then list1 = deel1
%>
 arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation). Value)%>"
 arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Val ue)%>"
 arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Val ue)%>"
<%
if (oDynaListRS.Fields.Item(txtDynaListRelation).Valu e) = (rs(txtDynaListRelation)) then deel1 = deel1 + 1
 If (len(oDynaListRS.Fields.Item(txtDynaListLabel).Val ue) > len(varMaxWidth)) Then
  varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value
 End If
 varCheckLength = varCheckLength + 1
 varDynaList = varDynaList + 3
 oDynaListRS.MoveNext()
Wend
===========================
rs = the recordset that contains the current product or item or whatever.
Now the variable list1 contains the index of the dropdown that needs to be selected so we can replace:
 oList.selectedIndex = 0;
with
 oList.selectedIndex = <%=list1%>;

Thanx to getting up really early with great coffee and a razorsharp concentration.

Reply With Quote