Hello!
Could somebody help me with this.
When I create recordset and run query :
<% Dim intCategoryID, oNew %>
<SCRIPT LANGUAGE = "VBScript">
Sub listBox_onChange()
<%Set rsSubcategory = connST.Execute ("SELECT SubcategoryName FROM Subcategory WHERE CategoryID = ‘” & intCategoryID & “’”)
<%Do While Not rsSubcategory.EOF %>
Set oNew = document.createElement(""
form1.selEquipment.add oNew
oNew.InnerText = "<%=rsSubcategory("SubcategoryName"
" <%rsSubcategory.MoveNext%>
<%Loop %>
End Sub
</SCRIPT>
The problem is that it cannot see the variable intCategoryID in a query string and does not populate another list box, but if I substitute ‘2’ instead of CategoryID it works well. The variable is working and displayed in the test label. Why? After all, can I create a recordset in subroutine on call? Is it correct to run server-side script inside client-side script?
Thanks
Could somebody help me with this.
When I create recordset and run query :
<% Dim intCategoryID, oNew %>
<SCRIPT LANGUAGE = "VBScript">
Sub listBox_onChange()
<%Set rsSubcategory = connST.Execute ("SELECT SubcategoryName FROM Subcategory WHERE CategoryID = ‘” & intCategoryID & “’”)
<%Do While Not rsSubcategory.EOF %>
Set oNew = document.createElement(""
form1.selEquipment.add oNew
oNew.InnerText = "<%=rsSubcategory("SubcategoryName"
<%Loop %>
End Sub
</SCRIPT>
The problem is that it cannot see the variable intCategoryID in a query string and does not populate another list box, but if I substitute ‘2’ instead of CategoryID it works well. The variable is working and displayed in the test label. Why? After all, can I create a recordset in subroutine on call? Is it correct to run server-side script inside client-side script?
Thanks