Hello,
Thanks to emozley and sheco I was able to develop a dynamic drop down list that reads from my db.
<%
'Open the database.
call OpenDB()
sql = "select * from view"
set rs = DbConn.Execute(sql)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<FORM name=brackets>
<%
Do While Not rs.EOF
%>
<select name="GameID<% = rs("GameID") %>">
<option value="<% = rs("VisitorID") %>" <% If rs("VisitorID")=rs("Selection") Then Response.Write("SELECTED") %>>
<% = rs("VisitorID") %>
</option>
<option value="<% = rs("HomeID") %>" <% If rs("HomeID")=rs("Selection") Then Response.Write("SELECTED") %>>
<% = rs("HomeID") %>
</option>
</select>
<%
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
Set dbConn=Nothing
%>
<br>
<input name="SubmitButton" type="submit" id="SubmitButton" value="Submit">
</FORM>
</body>
</html>
What I need to do with the drop down boxes is place them throughout my ASP page in a table/grid like format.
How can I do this with the loop involved.
I need to have 8 boxes in different locations on my page.
Thanks to emozley and sheco I was able to develop a dynamic drop down list that reads from my db.
<%
'Open the database.
call OpenDB()
sql = "select * from view"
set rs = DbConn.Execute(sql)
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<FORM name=brackets>
<%
Do While Not rs.EOF
%>
<select name="GameID<% = rs("GameID") %>">
<option value="<% = rs("VisitorID") %>" <% If rs("VisitorID")=rs("Selection") Then Response.Write("SELECTED") %>>
<% = rs("VisitorID") %>
</option>
<option value="<% = rs("HomeID") %>" <% If rs("HomeID")=rs("Selection") Then Response.Write("SELECTED") %>>
<% = rs("HomeID") %>
</option>
</select>
<%
rs.MoveNext
Loop
rs.Close
Set rs=Nothing
Set dbConn=Nothing
%>
<br>
<input name="SubmitButton" type="submit" id="SubmitButton" value="Submit">
</FORM>
</body>
</html>
What I need to do with the drop down boxes is place them throughout my ASP page in a table/grid like format.
How can I do this with the loop involved.
I need to have 8 boxes in different locations on my page.