I am new to asp. Using windows 7 + dreamweaver cs3.
I have small stationery website for coursework at uni. I created home page (default.asp), which has a dynamic drop down menu for products. The menu is displayed via include file catList.asp (see script below)
<%
Set catRS = Server.CreateObject( "ADODB.Recordset" )
catRS.ActiveConnection = Con
sqlString = "SELECT DISTINCT category FROM Product "
sqlString = sqlString & "WHERE status=1 "
sqlString = sqlString & "ORDER BY category"
catRS.Open sqlString
%>
<script language="JavaScript" type="text/javascript">
function loadPage(list)
{
location.href=list.options[list.selectedIndex].value
}
</script><title>My-stationer</title>
<form style="padding-left:6px" action="">
<select name="choice" size="1"
onchange="loadPage(this.form.elements[0])"
onmouseclick="this.focus()" >
<option>Select Category</option>
<% WHILE NOT catRS.EOF %>
<option value="default.asp?cat=<%=Server.URLEncode( catRS( "category" ) )%>"> <%=catRS( "category") %> </option>
<%
catRS.MoveNext
WEND
%>
</option>
</select>
</form>
I also created a shopping cart using session variable. I would like to keep the drop down menu on the left side of my cart page, but I get error:
ADODB.Recordset error ‘800a0bb9’
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/vir0077/coursework2/my-stationer/catList.asp, line 3 (this is the drop down menu file)
Can anyone tell me how to fix this? Otherwise I have to get rid of the drop down menu for the cart page, but all other pages have it..
V