Here is the code I have for this.  I am trying to select a location for electrical items.  The second select box includes all the items possible to be used with that location.

 

<cfquery name="qgrouploc" datasource="actevents">

            SELECT DISTINCT grouploc, grouploc_uuid AS ID_Field

            FROM grouploc

            ORDER BY grouploc

</cfquery>

 

<cfquery name="qgroupdesc" datasource="actevents">

            SELECT elecdesc, elec_uuid AS EID_Field

            FROM elecdescript

            ORDER BY elecdesc

</cfquery>

 

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel=stylesheet type="text/css" href="">

</head>

 

<body>

<!--- Add/Update Events Electrical Area and Items Form --->

<cfform action="">

  <cfselect name="ID" query="qgrouploc" value="ID_FIELD" display="grouploc">

  </cfselect>

            &nbsp;&nbsp;&nbsp;&nbsp;

  <cfselect name="EID" query="qgroupdesc" value="EID_FIELD" display="elecdesc" multiple="yes">

  </cfselect>

  <br>

  <br>

            <input type="Submit">

</cfform>

 

 

</body>

</html>

 

 

___________________________________________________________

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adaryl Wakefield
Sent: Thursday, May 27, 2004 12:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] Select Boxes

 

Well thats just kind of a matter of sticking in a third page no? page1 pick page 2 make sure page 3 process the info. I feel like im walking in the dark. Better explain a little better what your up to.

 

Adaryl "Did you reboot?" Wakefield
Aviator by passion
Programmer by sheer force of will

----- Original Message -----

From: George Quade

Sent: Thursday, May 27, 2004 12:08 PM

Subject: RE: [KCFusion] Select Boxes

 

Yes, I need to display the user selections.  If they have made an incorrect choice, they could go back and remove the selection before committing it to a table.

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adaryl "Bob" Wakefield
Sent: Thursday, May 27, 2004 12:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] Select Boxes

 

Well just with the information given I would crate a 2 dimensional array and loop over the array inserting each record into the database

<cfloop your array>

<cfquery insert your data>

</cfquery>

</cfloop>

 

 Id also use the array to display the user selections. Is that what you are after?

 

Adaryl "Did you reboot?" Wakefield
Aviator by passion
Programmer by sheer force of will

----- Original Message -----

From: George Quade

Sent: Thursday, May 27, 2004 11:47 AM

Subject: [KCFusion] Select Boxes

 

I would like to have 2 select boxes on a page.  The select boxes are 2 different tables not related.

 

I need to select one item from the first box and multiple items from the second box.

 

Then I need to display the items selected.  I also need to save the selected items by their UUID to a table.  In other words, I need the  #1 UUID and #2 UUID as a record and #1 UUID and #3 UUID as a record, etc.   The new table would look like PKUUID,FKUUID  (1,1  1,2  1,3  1,4 etc.)

 

 

I hope that I have made this clear.  If you have any questions, email me at [EMAIL PROTECTED]

 

Thanks for any help.

 

George Quade

 

Reply via email to