Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2004, 10:33 AM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Linked list boxes

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.






<!-- 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&nbsp;&nbsp; </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&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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">&nbsp;</P>












</B>
</FORM>












</BODY>
</HTML>

Thanks in advance.

 
Old January 19th, 2004, 11:00 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I believe we have covered this topic in this thread.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked List? pmcizhere Java Basics 2 March 6th, 2008 09:02 PM
Linked List....!!! amahja56 C++ Programming 4 April 6th, 2004 01:05 PM
Dynamic Linked List Boxes ms7ao Classic ASP Databases 2 January 16th, 2004 12:04 PM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 04:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.