Kris
If you are using Fusionscript, which I think you mentioned. There
is a Fusionscript list as well.
You can go to www.fusionscript.com to join.
But here is how I am returning my query results from the server page to the
calling (client page)
<!-----Server Page----------->
<Query>
Get info
</Query>
<CFIF Query.recordcount>
<CFSCRIPT>
<!---returns one record--------------->
myarray =arraynew(1);
myarray [1] = Query.Value1;
myarray [2] = Query.Value2;
myarray [3] = Query.Value3;
myarray [4] = Query.Value4;
myarray [5] = Query.Value5;
<!---If you want all records--------------->
Myarray = arraynew(2);
control = query.recordcount +1;
start = 1;
while (start LT control){
myarray[start][1] = Query.value1[start];
myarray[start][2] = Query.value2[start];
start = start +1;
}
</CFSCRIPT>
<cf_fs_activeServer action="return" name="returnarray"
value="#myarray#" type="array">
<!----Client page, remember CF starts arrays at 1 , Javascript at
-------->
<!-----inside the Fusionscript Funtion----------------->
<!---for 1D array---->
form.field1 = returnarray[0];
form.field2 = returnarray[1];
form.field3 = returnarray[2];
form.field4 = returnarray[3];
form.field5 = returnarray[4];
<!---for 2d array------->
<!---Normaly I use this for populating select lists---->
<cf_fs_loop from="0" to="arrayLen(returnarray)-1" index="i">
<cf_fs_select action="addOption"
field="'selectfieldname'"
value="returnarray[i][0]"
text="returnarray[i][1]">
</cf_fs_loop>
Let me know if this is what you were looking or has my caffeine not kicked
in yet ;o)
Rodney
-----Original Message-----
From: Kris Pilles [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 7:53 AM
To: CF-Talk
Subject: RE: Dynamic Array Help
Ok.... I've got my array.... However.... Now, I sent it back to where it
needs to go... How do I take the data within the array and basically
query it so I can sort it so I can parse the records out to populate my
form???
-----Original Message-----
From: Andrew Scott [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 10:23 AM
To: CF-Talk
Subject: RE: Dynamic Array Help
As in
<cfset array.ID = ArrayNew(1)>
<cfset array.AID = ArrayNew(1)>
<cfset array.ID[count] = value>
-----Original Message-----
From: Kris Pilles [mailto:[EMAIL PROTECTED]]
Sent: Friday, 28 June 2002 12:16 AM
To: CF-Talk
Subject: Dynamic Array Help
Haven't written a dynamic array in a while and need some help..... I
think ive forgotten how to...
Heres the column names....
ID
AID
Title
Description
DID
Grade
Science
Can someone tell me how to create a dynamic array... I need to store my
query results in an array so I can ship it through my API...
Thanks.
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.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