[thelist] Coldfusion: getting javascript variables

Erik Mattheis gozz at gozz.com
Tue Jan 8 19:22:24 CST 2002


>I want to be able to retrieve the data in a JavaScript array and put
>this into a list or struct in ColdFusion. Now what is the best way to do
>this?

One way would be to use array.toString() like this:

my_array = new Array('one','two','three');
split_up = escape(my_array.toString());

alert(split_up);

you could append the value of split_up to your URL so it would look like:

menu.cfm?one%2Ctwo%2Cthree

and in menu.cfm, you could examine #cgi.query_string# and find it to 
be one,two,three (CF automatically un escapes everything for you)

You already have a list to loop through.
-- 

__________________________________________
- Erik Mattheis

(612) 377 2272
http://goZz.com/

__________________________________________




More information about the thelist mailing list