|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
How do I get one list to alter the contents of another
I have a table category with id category_name active_indr and another publications with lv publication_name active_indr The category chosen in a list has an id. I then want the next list to contain all publication_name's where category.id = publications.id AND publications.active_indr=-1 How can I do this, and without having to reseting the page if possible? PLEASE HELP thanks in advance |
|
#2
|
|||
|
|||
|
www34.brinkster.com/emlebanon/jsparrow/countrylist
hey yessir
![]() Nice nick. So when I need to address you, I HAVE TO say sir yessir ![]() Now, you'll find what you need here Country - Cities List - The right way to do it Pick a country which then populates the cities field dynamically accessing the database in a second window and without refreshing the page. FULL SOURCE CODE AVAILABLE FOR FREE DOWNLOAD If you do use the script then Id love if you ad a credit to me ![]() cheers Shyam Gopinath |
|
#3
|
||||
|
||||
|
unfortunatley i came across this already...
well it's not unfortunate that i came across it, but rather that it is not easy to implement for me. I am new to ASP and such it is a little confusing, as well the use of variable names is overwhelming in this code as far as I need to go. As well I am on a time constraint and find it hard to change to what I need... I only have a little time to do this (work term). Is there anyway to shorten the code as to the sole implementation of the processes as far as the 2 lists go? There is a LOT of overkill in the code... OR is there another way? I say the use of filters on another site, is there a way to capture the value of a selected list item into a variable and use it to filter? Code:
Const adFilterNone = 0
Const adFilterPendingRecords = 1
Const adFilterAffectedRecords = 2
Const adFilterFetchedRecords = 3
Const adFilterConflictingRecords = 5
Dim oRS, strSQL, strConn
Set oRS = Server.CreateObject("ADODB.RecordSet")
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" _
&"Data Source=C:\Data\FPNWIND.mdb;"
strSQL = "SELECT * FROM Products"
oRS.Open strSQL, strConn, 3, 3
oRS.Filter = "UnitPrice < $20.00"
'Recordset contains
'Only Records Where the Unit Price is Less than $20
Do While Not oRS.EOF
Response.Write(oRS("CategoryID") & "<BR>")
oRS.MoveNext
Loop
‘Remove Filter
oRS.Filter = adFilterNone
'RecordSet Now Contains All Field Data again
oRS.Filter = "SupplierID = 10"
'Recordset contains
'Only Records Where the Supplier ID is 10
Do While Not oRS.EOF
Response.Write(oRS("CategoryID") & "<BR>")
oRS.MoveNext
Loop
oRS.Close
Set oRS = Nothing
Last edited by yessir : October 6th, 2003 at 08:54 AM. |
|
#4
|
|||
|
|||
|
oh yessir,
im sorry, my fault. the code is a document template i confess. give me some time im really tied up. if you figure it out though, do post it here so other users can see it cheers shyam gopinath |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > generating list |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|