Could anyone tell what is wrong with the following script and how would I go about fixing it.
<%@ LANGUAGE = JavaScript%>
<HTML>
<BODY>
<h3>Dog Breed Selector</h3>
<p>Please choose what Size of dog you would prefer:</p>
<form>
<table>
<td><input type='radio' name='size' value='S'>Small</td>
<td><input type='radio' name='size' value='M'>Medium</td>
<td><input type='radio' name='size' value='L'>Large</td>
<td><input type='submit' value='Find a Dog'></td>
<script>
<%
// Open connection to database, then populate a recordset with list of stock
var adoConnection = Server.CreateObject("ADODB.Connection"
;
var adoRecordSet;
var mySQL;
adoConnection.Open("DSN=DogDSN"
;
var mySQL = "SELECT BreedName" +
" FROM Breeds WHERE Size= & Request.Form("size"
";
adoRecordSet = adoConnection.Execute(mySQL);
// Loop through recordset and write Breed Names out to page
while ( adoRecordSet.Eof == false )
{
%>
<TR>
<TD><%=adoRecordSet("BreedName"
.Value%></TD>
</TR>
<%
adoRecordSet.MoveNext();
}
// Close Recordset and connections
// and release memory used by Recordset and Connection objects
adoRecordSet.Close();
adoRecordSet = null;
adoConnection.Close();
adoConnection = null;
%>
<%Response.Write(Request.Form("size"
)
%>
</script>
</BODY>
<%@ LANGUAGE = JavaScript%>
<HTML>
<BODY>
<h3>Dog Breed Selector</h3>
<p>Please choose what Size of dog you would prefer:</p>
<form>
<table>
<td><input type='radio' name='size' value='S'>Small</td>
<td><input type='radio' name='size' value='M'>Medium</td>
<td><input type='radio' name='size' value='L'>Large</td>
<td><input type='submit' value='Find a Dog'></td>
<script>
<%
// Open connection to database, then populate a recordset with list of stock
var adoConnection = Server.CreateObject("ADODB.Connection"
var adoRecordSet;
var mySQL;
adoConnection.Open("DSN=DogDSN"
var mySQL = "SELECT BreedName" +
" FROM Breeds WHERE Size= & Request.Form("size"
adoRecordSet = adoConnection.Execute(mySQL);
// Loop through recordset and write Breed Names out to page
while ( adoRecordSet.Eof == false )
{
%>
<TR>
<TD><%=adoRecordSet("BreedName"
</TR>
<%
adoRecordSet.MoveNext();
}
// Close Recordset and connections
// and release memory used by Recordset and Connection objects
adoRecordSet.Close();
adoRecordSet = null;
adoConnection.Close();
adoConnection = null;
%>
<%Response.Write(Request.Form("size"
%>
</script>
</BODY>