Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 5th, 2003, 02:06 PM
Registered User
Join Date: Jul 2003
Location: , NY, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to tcasp
Default Two drop down dependent list boxes and a Button

I need little help or suggestion regarding displaying selected item and its information from second list box.

I can populate the first list box from database ,then on the basis of selected category from first I can populat the second one but when I select one item from second list box it displays all the items in that subcategoy ,I want to display only selected itemm and information about it from the database.

here is info
listbox 1 listbox 2 Name= Models
Name: Makes
tablename=Makes table Name =Models
cols Cols of tables
Makeid autonum Modelid autno unique value
Makes Honda Makeid it can has multiple values
        Ford Model

Here is code,I am skipping the first part of code

<%@ Language=VBScript %>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">


makeid = Request.form("makeid")
model = Request.form("Model")
make = Request.form("make")
models = Request.Form("models")
makes = Request.Form("makes")
modelid = Request.Form("modelid")

Set objConn=server.createobject("adodb.connection")

objConn.open("Provider=Microsoft.Jet.OLEDB.4.0;D ata Source="&server.mappath("cars.mdb"))

Set rs=objConn.execute("SELECT Makes.make,Models.Model,Models.makeid,modelid " &_
    " FROM Makes,Models Where makes.makeId ="&models.makeid&" and models.makeid="&request("makes")&" "&_
     " and models.makeid="&Request("models")&" and models.modelid="&modelid&" ")

<center> <table border="1" cellpadding="2" width="30%" height="10%">

     <tr><STRONG>This is for selected value from second list box</STRONG><U></U>
         <tr align=left>

                 <th>Make Id</th>

     <% Do while not Rs.EOF %>
                <td> <%=rs("Make") %></td>
                <td> <%=rs("Model") %></td>
                <td> <%=rs("MakeId") %></td>


             <% Rs.movenext

            Set Rs =nothing
            Set objconn =nothing


and the errro:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Convertible'
/good/contents_ddropdown.asp, line 22

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

POST 43 bytes to /good/contents_ddropdown.asp

POST Data:

Any suggestion(s) will be greatly appreciated.

Thank you.
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retain form values from dependent list ? George B Javascript 0 September 15th, 2006 03:54 PM
dependent drop downs p2pMember ASP.NET 1.0 and 1.1 Professional 0 July 19th, 2006 05:25 AM
3 Drop Down box w/ db values & dependent choices smarks Classic ASP Databases 1 March 2nd, 2005 03:32 PM
Retain form value from dependent list box qhong Dreamweaver (all versions) 18 November 4th, 2004 03:36 AM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 04:07 AM

All times are GMT -4. The time now is 09:50 AM.

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