HighDots Forums  

server-side dynamic dependent list boxes

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss server-side dynamic dependent list boxes in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Danyell Wilt
 
Posts: n/a

Default server-side dynamic dependent list boxes - 07-30-2004 , 04:44 PM






I have looked all over the place and have found serveral examples of
client-side dynamic dependent list boxes, but nothing on server-side dynamic
dependent list boxes.

I have too much data to load all of the data at once and would prefer this
to happen server side. Can anybody point me in the right direction on how to
accompish this?

Thanks,
Danyell



Reply With Quote
  #2  
Old   
Thy Pi Guy
 
Posts: n/a

Default Re: server-side dynamic dependent list boxes - 07-30-2004 , 05:09 PM






Care to elaborate? What exactly are you trying to do?

Reply With Quote
  #3  
Old   
Danyell Wilt
 
Posts: n/a

Default Re: server-side dynamic dependent list boxes - 07-30-2004 , 05:36 PM



I am creating a report builder for a doctor.

They first select the "Type of Study" for the patient in a drop down list
This drop down list will then query a recordset for all of the available
canned "report descriptions" for that particular "Type of Study" and those
choices will be available on the second drop down list.
When the "report description" is selected the acutal text for that report
description will be put into the textarea field where they can make minor
changes.

I know this can be easily accomplished with multiple pages, but I would like
for it all to happen on one page. I know with server side there will be a
"refresh" after each selection, but that is not an issue.

I hope this helps.


"Thy Pi Guy" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Care to elaborate? What exactly are you trying to do?



Reply With Quote
  #4  
Old   
Kindler Chase
 
Posts: n/a

Default Re: server-side dynamic dependent list boxes - 07-30-2004 , 06:38 PM



Danyell Wilt wrote:
Quote:
I am creating a report builder for a doctor.

They first select the "Type of Study" for the patient in a drop down
list This drop down list will then query a recordset for all of the
available canned "report descriptions" for that particular "Type of
Study" and those choices will be available on the second drop down
list.
When the "report description" is selected the acutal text for that
report description will be put into the textarea field where they can
make minor changes.

I know this can be easily accomplished with multiple pages, but I
would like for it all to happen on one page. I know with server side
there will be a "refresh" after each selection, but that is not an
issue.

I hope this helps.
Would probably work better with a client-side dependant list box scenario.
If you can use ASP, then look over here for a sample and download:
http://www.roubaixinteractive.com/PlayGround/JavaScript/Dependent_List_Box.asp

The link above also contains the link to the original MM article that will
show how to use the technique for other server models as well.

--
kindler chase
http://www.ncubed.com
Home of SuperInvoice: The Online Invoicing Application.
Organize your billing process and impress your clients.

news://news.ncubed.com/support
n3 Support Group




Reply With Quote
  #5  
Old   
cmbergin
 
Posts: n/a

Default Re: server-side dynamic dependent list boxes - 08-02-2004 , 10:37 AM



In this scenario, use Jump Menus for your list boxes. The MM jump menu code
will get you started.

Basically, you'll have jump menu 1 pass its value via query string. Set it to
jump to the page you're already on.
You'll need a little hand-coding, but in the end, it will look something like
this:

<select name="typeMenu" onChange="MM_jumpMenu('self',this,0)">
<%
Do While NOT typeRS.EOF
%>
<option value="ThisPage.asp?Type=<%=typeRS.Fields.Item("Ty peID").Value%>" <%If
ThisType = typeRS.Fields.Item("TypeID").Value Then Response.Write("selected")
End If%>><%=typeRS.Fields.Item("TypeName").Value%></option>
<%
typeRS.MoveNext()
Loop
%>

Filter your report description recordset on Request.QueryString("Type"), and
make sure to give it the default value of the first item in your type recordset.

<%
Code to set up rsType
rsType.Open()
Dim ThisType
ThisType = Request.QueryString("Type")
If ThisType = "" Then
ThisType = rsType.Fields.Item("TypeID").Value
%>

Now, filter your rsReports on the variable ThisType. You'll notice that the
jump menu code above also makes use of ThisType to make the menu choice
"sticky". Using a variable is much faster than repeatedly requesting the value
from the query string. Then, you can set up your report description menu as a
normal dynamic menu using the rsReports recordset you created.

That's about it. Let me know if I wasn't real clear; I'm not the best teacher
around.


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.