Guest_imported
New member
- Jan 1, 1970
- 0
Question
I made a drop down list and I have three problems
1- in drop down list I want it to begin with “ chose from the list” it is empty now
how to do this
2- the select statement is showing is the page which is “Select movies.title,released…….”
How to get red of it
3- I don’t want the table header to appear till someone chose from the list
-----
<html>
<H1>Movies Genres list</H1>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
adCmdText=1
Dim objConn, GenRS, GenSQL, movgRS, movgSQL, vGENRE, movRS
Set objConn = Server.CreateObject("ADODB.Connection"
Set GenRS = Server.CreateObject("ADODB.Recordset"
Set movgRS = Server.CreateObject("ADODB.Recordset"
vGENRE = request.form("DeptPicked"
objConn.Open "Provider=MSDAORA.1;User ID=id;Password=pas;"
GenSQL = "Select * from genres order by genre"
movgSQL = "Select movies.title,released where genre='" & vGENRE & "'"
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
movgRS.open movgSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
response.write "<BR>" & movgSQL & "<BR>"
response.write("<form action=' method='POST'>"
response.write("<select name='DeptPicked'>"
response.write("<option value=''></option>"
while not GenRS.eof
response.write("<option value='" & GenRS("genre"
& "'>" & GenRS("genre"
& "</option>"
GenRS.movenext
Wend
response.write("</select>"
response.write("<input type='submit' value='Retrieve Movies List'>"
response.write("</form>"
response.write("<BR> Movies List: " & vGENRE & "<BR>"
%>
<BIG>
<TABLE border=0 cellPadding=0 cellSpacing=2 height=0 width='76%'>
<TR>
<TD align=center width='55%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">
Title</font></TD>
<TD align=center width='19%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">Year
Released</font></TD>
<TD align=center width='14%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">
Rating</font></TD>
<TD align=center width='13%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">
Review</font></TD>
</TR>
<%
while not movgRS.eof
response.write("<TR>"
response.write("<TD>" & movgRS("title"
& "</TD>"
response.write("<TD>" & movgRS("released"
& "</TD>"
response.write("<TD>" & movgRS("rating"
& "</TD>"
response.write("<TD>" & movgRS("review"
& "</TD>"
response.write("</TR>"
movgRS.movenext
Wend
response.write("</table></BIG>"
GenRS.close
movgRS.close
objConn.close
Set GenRS = Nothing
Set movgRS = Nothing
Set objConn = Nothing
%>
<BR><HR>
</table>
</big>
</HTML>
I made a drop down list and I have three problems
1- in drop down list I want it to begin with “ chose from the list” it is empty now
how to do this
2- the select statement is showing is the page which is “Select movies.title,released…….”
How to get red of it
3- I don’t want the table header to appear till someone chose from the list
-----
<html>
<H1>Movies Genres list</H1>
<%
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly=0
adLockReadOnly=1
adCmdTable=2
adCmdText=1
Dim objConn, GenRS, GenSQL, movgRS, movgSQL, vGENRE, movRS
Set objConn = Server.CreateObject("ADODB.Connection"
Set GenRS = Server.CreateObject("ADODB.Recordset"
Set movgRS = Server.CreateObject("ADODB.Recordset"
vGENRE = request.form("DeptPicked"
objConn.Open "Provider=MSDAORA.1;User ID=id;Password=pas;"
GenSQL = "Select * from genres order by genre"
movgSQL = "Select movies.title,released where genre='" & vGENRE & "'"
GenRS.open GenSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
movgRS.open movgSQL, objConn, adOpenForwardOnly, adLockReadOnly, AdCmdText
response.write "<BR>" & movgSQL & "<BR>"
response.write("<form action=' method='POST'>"
response.write("<select name='DeptPicked'>"
response.write("<option value=''></option>"
while not GenRS.eof
response.write("<option value='" & GenRS("genre"
GenRS.movenext
Wend
response.write("</select>"
response.write("<input type='submit' value='Retrieve Movies List'>"
response.write("</form>"
response.write("<BR> Movies List: " & vGENRE & "<BR>"
%>
<BIG>
<TABLE border=0 cellPadding=0 cellSpacing=2 height=0 width='76%'>
<TR>
<TD align=center width='55%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">
Title</font></TD>
<TD align=center width='19%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">Year
Released</font></TD>
<TD align=center width='14%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">
Rating</font></TD>
<TD align=center width='13%' bgcolor='#FFFFCC' style="border-style: solid; border-width: 1"><font color="#0000FF">
Review</font></TD>
</TR>
<%
while not movgRS.eof
response.write("<TR>"
response.write("<TD>" & movgRS("title"
response.write("<TD>" & movgRS("released"
response.write("<TD>" & movgRS("rating"
response.write("<TD>" & movgRS("review"
response.write("</TR>"
movgRS.movenext
Wend
response.write("</table></BIG>"
GenRS.close
movgRS.close
objConn.close
Set GenRS = Nothing
Set movgRS = Nothing
Set objConn = Nothing
%>
<BR><HR>
</table>
</big>
</HTML>