The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Simple Button
Kendall
post Apr 19 2012, 02:54 PM
Post #1





Group: Members
Posts: 1
Joined: 19-April 12
Member No.: 16,950



I'm trying to make my button go to Task2-Step2.asp. What am I missing?

[code]
<html>
<head>
<title>Assignment Twelve</title>
<link rel=stylesheet type='text/css' href='MyStyle.css'>
</head>

<!--#include file="MyInfo.asp" -->

<body>
<h2>Kendall's Task 2</h2>
<%


' Open connection to back-end SQL Server database
Set conn=Server.CreateObject("ADODB.Connection")
conn.CommandTimeout=15
conn.ConnectionTimeout=15
conn.Open BackEnd

' Begin input form
Response.Write("<form action='Task2-Step2.asp' method='post'>")


' Open recordset
sql="SELECT Distinct College FROM tblDiscipline INNER JOIN tblStudent ON tblDiscipline.DID=tblStudent.Major ORDER BY College"

Set rst=Server.CreateObject("ADODB.Recordset")
rst.Open sql, conn

' Display colleges
Response.Write("<h3>College</h3>")

Response.Write("<select name='College' style='width:150px'>")
Response.Write("<option value='College' selected></option>")
Do Until rst.EOF
Response.Write("<option value='" & rst("College") & "'>" & rst("College") & "</option>")
rst.MoveNext
Loop
Response.Write("</select>")


' Display button
Response.Write("<br><br>")
Response.Write("<input type='submit' value='Students'")


' End input form
Response.Write("</form>")


' Close recordset
rst.Close
Set rst=Nothing

' Close database connection
conn.Close
Set conn=Nothing
%>
</body>
</html>

This post has been edited by Kendall: Apr 19 2012, 02:55 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 19 2012, 03:59 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,649
Joined: 10-August 06
Member No.: 7



What does the rendered HTML look like when you run the ASP script on the server?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 19 2012, 05:44 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



What happens when they hit the submit button?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 06:44 PM