I have an array of strings in my .js file and I am using $.get() to call a .cfm page to do a query (eventually) but would like to know how I can store the data sent using $.get() to a variable in my .cfm file.
.js
var obj = []; //array
//code to put strings in 'obj'
$.get("submit.cfm",{data: obj});
submit.cfm
<cfparam name="temp1" default="">
<cfset tempArr = ArrayNew(6)>
?. Do I want to use a < cfparam >, < cfset > or is there a better alternative?
The goal of submit.cfm is eventually to do something of the sorts:
<cfquery name="sample" datasource="database_live">
SELECT temp1[1], temp1[2], etc....
FROM table
</cfquery>
submit.cfm?arr=foo,bar,fubar? I'd use<cfparam name="URL.arr" default="">