Thanks again for the assistance.
I want to populate data based on the first select drop down. I tried the
AutoPopulate and TwoSelectsRelated from the Allaire Developer site, but I
don't know where to place the tag and what else need to be done. Please see
below of my code. I'm able to create a dynamic select box, but the text box
based on the select box. This is CF4.5.2 on NT.
The table and columns are used for testing only.
<CFQUERY NAME="myquery" DATASOURCE="CompanyInfo">
SELECT passwords.UserID
FROM passwords
</CFQUERY>
<body>
User
<select name="UserPwd">
<cfoutput query="myquery">
<option value="#myquery.UserID#">
#myquery.UserID#
</cfoutput>
</SELECT>
<input type="Hidden" value="" name="ID">
Password
<input type="Text" name="Password">
</body>
Jeffry Houser <[EMAIL PROTECTED]> wrote:
I think I understand a little more.
Run a CFQUERY to get all the data. This creates a query object in
ColdFusion.
A query is an array of structures, by definition. Structures are
name-value pairs, like an associative array. So, in essence a 2
dimensional array automatically. You can use the query attribute of either
CFLOOP or CFOUTPUT to loop over the data and display it.
I'm going to assume (uh, oh) that you know the columns that are being
returned and will be able to hard-code the column list:
<CFQUERY name="myquery">
select * from mytable
</CFQUERY>
<TABLE>
<CFOUTPUT query="myquery">
<TR>
<TD>#myquery.column1#</TD>
<TD>#myquery.column2#</TD>
<TD>#myquery.column3#</TD>
</TR>
</CFOUTPUT>
</TABLE>
That is untested code, but it should give you the general gist of what
to do.
At 07:05 AM 08/27/2001 -0700, you wrote:
>Hi, Jeffry,
>
>Thanks for the response.
>
>It is a database table. What I want to do is to make an array dynamically
>without hard coded 3000 rows in the array for a select drop down. I'll look
>into the CFLOOP. I'm still new in CF and sometimes do not have a clue where
to
>start.
>
>Thanks again,
>Julia
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists