Hi,
I am trying to create a linked list box where a user selects a room number from a list box and on selection of the room number another list boxes opens up beneath it contain a list of the serial numbers in that particular room chosen by the user. If anyone has any ideas or could point me in the right direction I would appreciate it. I have looked at the FAQs and tried them with no success; can some please help or point me in the right direction please.
<!--#include file="connectionstring.asp" --> <!--'Server side include used to hold the database connection details. Page 481 in Beginning ASP 3.0 book-->
<!-- METADATA TYPE="typelib" 'This makes the ADO constants available without having to define them as constants. This information has been taken from page 519 of Beginning ASP 3.0
FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<%
Dim strConnect
Dim objRS ' Declare variable for recordset object
Set objRS = Server.CreateObject("ADODB.Recordset"
'Create the the recordset object
objRS.open "Room", strConnect
objRS.MoveFirst
%>
<HTML>
<HEAD>
<TITLE>MHCHS - Report a fault</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFF80">
<P ALIGN="CENTER"><U><B>Welcome to the Online Fault Management System</B></U></P>
<P ALIGN="CENTER"><B><B>You are logged in as a <% =session("Role"
%> </B></U> </P>
<%
If Session("Role"
= "Technician" Then
Response.write "<A HREF=FaultDetails.asp>Fault Reports</A><BR>"
Response.write "<A HREF=AssignedJobs.asp>View jobs assigned</A><BR>"
Response.write "<A HREF=home.asp>Log out</A><BR>"
Response.write "<A HREF=ChangePassword.asp>Change Password</A><BR>"
ElseIF session("Role"
= "User" Then
'Response.write "<A HREF=ReportFault.asp>Report a fault</A><BR>"
Response.write "<A HREF=ViewFaultProgress.asp>View fault progress reports</A><BR>"
Response.write "<A HREF=home.asp>Log out</A><BR>"
Response.write "<A HREF=ChangePassword.asp>Change Password</A><BR>"
Else
Response.write "<A HREF=AssignJobs.asp>Assign a job</A><BR>"
Response.write "<A HREF=ViewDailyLog.asp>View daily fault log</A><BR>"
Response.write "<A HREF=Weighting.asp>View Technician weighting</A><BR>"
Response.write "<A HREF=ViewProgressDetails.asp>View Progress details</A><BR>"
Response.write "<A HREF=Register.asp>Create User Account</A><BR>"
Response.write "<A HREF=ChangePassword.asp>Change Password</A><BR>"
Response.write "<A HREF=home.asp>Log out</A><BR>"
End If
%>
<FORM ACTION = "AddFault.asp" METHOD = "POST">
<P ALIGN="CENTER"><b>Fault Reported by :<% =session("StaffName"
%></B><BR></B>
<P ALIGN="CENTER"><b>Email Address:<% =session("EmailAddress"
%></B><BR></B>
<P ALIGN="CENTER"><b>Type Of Fault </b><SELECT NAME ="FaultType" Size="1">
<OPTION SELECTED VALUE="Hardware">Hardware</OPTION>
<OPTION VALUE="Software">Software</OPTION>
<OPTION VALUE="Network">Network</OPTION>
<OPTION VALUE="Other">Other</OPTION>
'Code used and adapted from Beginning ASP Databases on page 162
</SELECT><p align="CENTER"><b>Location </b>
<SELECT NAME="Location" SIZE="1">
<%
Do While NOt objRS.EOF
Response.Write "<OPTION VALUE='" & objRS("RoomNo"
& "'>" & "<BR>"
Response.Write objRS("RoomNo"
& "</OPTION>" & "<BR>"
objRS.MoveNext
Loop
objRS.Close
Set objRS = Nothing
%>
</SELECT></B><BR>
<P ALIGN="CENTER"><TextArea Name = "Details" COLS=50 ROWS= 10></TextArea><BR><BR>
<input type = "Submit" Value = "Submit Fault"></a><input type = "Reset" Value = "Clear Form"><BR>
<BR>
</P>
</FORM>
<P ALIGN="CENTER"> </P>
</B>
</FORM>
</BODY>
</HTML>
Thanks in advance.
I am trying to create a linked list box where a user selects a room number from a list box and on selection of the room number another list boxes opens up beneath it contain a list of the serial numbers in that particular room chosen by the user. If anyone has any ideas or could point me in the right direction I would appreciate it. I have looked at the FAQs and tried them with no success; can some please help or point me in the right direction please.
<!--#include file="connectionstring.asp" --> <!--'Server side include used to hold the database connection details. Page 481 in Beginning ASP 3.0 book-->
<!-- METADATA TYPE="typelib" 'This makes the ADO constants available without having to define them as constants. This information has been taken from page 519 of Beginning ASP 3.0
FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<%
Dim strConnect
Dim objRS ' Declare variable for recordset object
Set objRS = Server.CreateObject("ADODB.Recordset"
objRS.open "Room", strConnect
objRS.MoveFirst
%>
<HTML>
<HEAD>
<TITLE>MHCHS - Report a fault</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFF80">
<P ALIGN="CENTER"><U><B>Welcome to the Online Fault Management System</B></U></P>
<P ALIGN="CENTER"><B><B>You are logged in as a <% =session("Role"
<%
If Session("Role"
Response.write "<A HREF=FaultDetails.asp>Fault Reports</A><BR>"
Response.write "<A HREF=AssignedJobs.asp>View jobs assigned</A><BR>"
Response.write "<A HREF=home.asp>Log out</A><BR>"
Response.write "<A HREF=ChangePassword.asp>Change Password</A><BR>"
ElseIF session("Role"
'Response.write "<A HREF=ReportFault.asp>Report a fault</A><BR>"
Response.write "<A HREF=ViewFaultProgress.asp>View fault progress reports</A><BR>"
Response.write "<A HREF=home.asp>Log out</A><BR>"
Response.write "<A HREF=ChangePassword.asp>Change Password</A><BR>"
Else
Response.write "<A HREF=AssignJobs.asp>Assign a job</A><BR>"
Response.write "<A HREF=ViewDailyLog.asp>View daily fault log</A><BR>"
Response.write "<A HREF=Weighting.asp>View Technician weighting</A><BR>"
Response.write "<A HREF=ViewProgressDetails.asp>View Progress details</A><BR>"
Response.write "<A HREF=Register.asp>Create User Account</A><BR>"
Response.write "<A HREF=ChangePassword.asp>Change Password</A><BR>"
Response.write "<A HREF=home.asp>Log out</A><BR>"
End If
%>
<FORM ACTION = "AddFault.asp" METHOD = "POST">
<P ALIGN="CENTER"><b>Fault Reported by :<% =session("StaffName"
<P ALIGN="CENTER"><b>Email Address:<% =session("EmailAddress"
<P ALIGN="CENTER"><b>Type Of Fault </b><SELECT NAME ="FaultType" Size="1">
<OPTION SELECTED VALUE="Hardware">Hardware</OPTION>
<OPTION VALUE="Software">Software</OPTION>
<OPTION VALUE="Network">Network</OPTION>
<OPTION VALUE="Other">Other</OPTION>
'Code used and adapted from Beginning ASP Databases on page 162
</SELECT><p align="CENTER"><b>Location </b>
<SELECT NAME="Location" SIZE="1">
<%
Do While NOt objRS.EOF
Response.Write "<OPTION VALUE='" & objRS("RoomNo"
Response.Write objRS("RoomNo"
objRS.MoveNext
Loop
objRS.Close
Set objRS = Nothing
%>
</SELECT></B><BR>
<P ALIGN="CENTER"><TextArea Name = "Details" COLS=50 ROWS= 10></TextArea><BR><BR>
<input type = "Submit" Value = "Submit Fault"></a><input type = "Reset" Value = "Clear Form"><BR>
<BR>
</P>
</FORM>
<P ALIGN="CENTER"> </P>
</B>
</FORM>
</BODY>
</HTML>
Thanks in advance.