i have this script that's be giving me errors what ever i do. if you could please help Type mismatch: 'arrOutput3' Line: 38 <select name="model" onchange="getpage(<% Response.Write ""&arrOutput3(1,i)&"" %>,this.value)"> The entire script: <% set objDBConnection3 = Server.CreateObject("ADODB.Connection") objDBConnection3.ConnectionTimeout = 15 objDBConnection3.CommandTimeout = 30%> <% objDBConnection3.Open "dataconnection;" set objDBCommand3 = Server.CreateObject("ADODB.Command") objDBCommand3.ActiveConnection = objDBConnection3 objDBCommand3.CommandText = "SELECT model ,CAT_ID,make FROM listing WHERE CAT_ID = ? ORDER BY model ASC" objDBCommand3.CommandType = 1 strmarques3 = "1" If (Request.QueryString("catid") <> "") Then strmarques3 = Request.QueryString("catid") %> <% set objDBParam3 = objDBCommand3.CreateParameter("@column",5, 1, -1) objDBCommand3.Parameters.Append objDBParam3 objDBCommand3.Parameters("@column") = strmarques3 set objDBParam3 = Nothing set objDBRecords3 = objDBCommand3.Execute If Not objDBRecords3.EOF Then arrOutput3 = objDBRecords3.GetRows() objDBRecords3.Close objDBConnection3.Close Set objDBConnection3 = Nothing Set objDBRecords3 = Nothing %> <% Dim occasions occasions = UBound(arrOutput3, 2) 'Response.Write ""&arrOutput3(2,i)&"" %> <input name="marque" type="hidden" id="make" value="<% Response.Write ""&arrOutput3(2,i)&"" %>" /> <% End If %> <select name="model" onchange="getpage(<% Response.Write ""&arrOutput3(1,i)&"" %>,this.value)"> <option value="">Tous</option> <% For i = 0 To UBound(arrOutput3, 2)%> <option value="<%=arrOutput3(0,i)%>"><%=arrOutput3(0,i)%></option> <% Next %> </select> <% End If %>
Maybe I am missing something here but how is "i" defined in your SELECT line? In your OPTIONs, "i" is defined as the value in the FOR loop but that is after your SELECT line. I'm thinking that because "i" is null before it gets to the for loop, the type mismatch is because you get arrOutput3(2,)?