Hi,

I just created a custom tag called CF_RelateList.  It works just like
CF_TwoSelects and CF_ThreeSelects.  When you select an item in one select
list, a new list of items will be generated in the second select list. This
CF_RelateList allows you to create individual select lists.  This would make
the tag more flexible.  You can have two, three, or as many select lists as
you want and they would all be related.  You can generate the lists from
different queries as long as they have the value column of its parent list
to compare to.  You can place the lists anywhere in any types of layouts you
want.  I plan to make this a public domain for everyone to use.

Would you please test it and let me know if there are any bugs, suggestions
for improvement, additional features requests?  Is CF_RelateList a good
name?  Are the attributes easy to remember and easy to know what they are
for?

The Custom tag is attached.  If you don't see the attachment, you can find
it in the Files area of the ColdFusion-howto group on Yahoo.

To use the tag:

<cf_relatelist List="ListName" Query="QueryName" TextColumn="OptionText"
valuecolumn="OptionValues" ParentList="RereferentList"
ParentColumn="ParentValue" ChildList="Divisions" Form="FormName">

Here is a list of attributes.  Only two attributes are really required.

1. List: The name of the select list you want to create - require.
2. Query: The name of the query you are using to generate the list -
require.

3. ChildList: The name of the select list that will be generated when you
select an item in this list - require if it is not the last list in the
series.

4. TextColumn: A column/field in the query to generate the text between
option tags - optional - it will use the first column in the query.
5. ValueColumn: A column/field in the query to generate the value of the
option tags - optional - it will use the text column.
6. ParentList: The name of the list that will generate this list when an
item is selected - optional if it is the first list in the series.

7. ParentColumn: The value column of the parent list in the query. It helps
to figure out which items belong to the selected item in the parent list. -
required if ParentList attribute exists.

8. Form: The name of the form - optional if there is only one form on the
page.

I am looking forward to receive your feedback.
Sincerely yours,

Johnny Le
Web/Multimedia Specialist
NASA Peer Review Services
500 E Street, SW Suite 200
Washington, DC 20024
202-479-9030x422
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to