Hallo Leuts ![]()
vielleicht kann mir jemand helfen bei einer fehlerhaften Anzeige zweier miteinander verbundenen dropdown listen, die jeweils daten aus 2 datenbanktabellen auslesen. ein Beispiel kann man auf http://www.steinert-invest.com/contentimmo/sh….asp?fldAuto=51
sehen.
Ich hab schon die diversen Foren durchsucht aber nix gefunden.
Hier mal der Code: wobei das problem eventuell in der optionex.js liegen könnte.
<script language=Javascript src="../includes-menu/optionex.js"></script>
<script language=Javascript>
//create ourlink list for categories and SubCategories
var oCatname = new OptionCollection();
oCatname.Add(" ", "[ Alle anzeigen ]", " ");
<% dim rsDatos
dim IdCategoria
dim strSQL
strSQL="SELECT Category.fldAuto As IdCategoria, "& _
"Category.catname As Categoria, "& _
"Brand.fldAuto As IdSubCategoria, "& _
"Brand.name As Texto "& _
"FROM (Model LEFT JOIN Brand ON (Model.brand_fldAuto = Brand.fldAuto)) LEFT JOIN Category "& _
"ON (Brand.category_fldAuto = Category.fldAuto) "& _
"WHERE (Active=2) "& _
"GROUP BY Category.fldAuto, "& _
"Category.catname, "& _
"Brand.fldAuto, "& _
"Brand.name"
set rsDatos=GetConnectionDataBase(0).Execute(strsql, , 1)
Do While Not rsDatos.Eof
If IdCategoria <> rsDatos.Fields("IdCategoria").Value Then
IdCategoria=rsDatos.Fields("IdCategoria").Value
%>
// <%=rsDatos.Fields("Categoria").Value%><%
If GetConnectionDataBase(0).Execute("SELECT Count(*) FROM Brand LEFT JOIN Model ON (Brand.fldAuto = Model.brand_fldAuto) WHERE (active=2) and (Brand.Category_fldAuto=" & rsDatos.Fields("IdCategoria").Value & ")", , 1).Fields(0).Value > 1 Then
%>
oCatname.Add("<%=IdCategoria%>", "[ Alle anzeigen ]", "<%=IdCategoria%>");<%
End If
End If
%>
oCatname.Add("<%=rsDatos.Fields("IdSubCategoria").Value%>", "<%=rsDatos.Fields("Texto").Value%>", "<%=rsDatos.Fields("IdCategoria").Value%>");<%
rsDatos.MoveNext
Loop
If Not (rsDatos Is Nothing) Then
rsDatos.close
Set rsDatos=Nothing
End If
%>
function doClear(theText) {
if (theText.value == theText.defaultValue) {
theText.value = ""
}
}
//-->
</script>
wenn mir irgend jemand weiterhelfen könnte wär ich super dankbar.
Greets
Rolf