• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

Passing a JavaScript 3-D Array Into Another Page?

The title says it all. Well, if it's not possible, can I pass the javascript 3-d array into a  Coldfusion variable(array)? The computation must be on the client side so I cant really set the results directly into ColdFusion
0
mdoza
Asked:
mdoza
  • 3
  • 2
1 Solution
 
cLFlaVACommented:
Have you thought about setting a cookie on the originating page with the three-dimensional array, and then retrieving the cookie on the following page?
0
 
mdozaAuthor Commented:
hhmm, I never thought of that. That would suffice my needs but I dont really know how to set a cookie thru javascript, Im a javascript n00b *scratches head*


can you give me a sample?
0
 
mdozaAuthor Commented:
btw, back to my original 2nd question, is it not really possible passing the value of a javascript variable to a cf variable?
0
 
cLFlaVACommented:
Coldfusion is executed and completed on the server side.  The result of the execution is then sent to the client browser, where html and javascript are written out.  Then, and only then, will javascript code have the ability to function.  As you can see, there is no way, on the current page, that you can communicate between coldfusion and javascript.

You can, however, potentially pass a value in the url to a new (or the same) coldfusion page using javascript.  This way, coldfusion could utilize this variable and do things with it.

You, however, are trying to use a 3-D array, and there is no efficient way you can pass this through the url.

Help on cookies:

http://webmonkey.wired.com/webmonkey/reference/javascript_code_library/wm_ckie_lib/?tw=reference&category=forms_data

Hope this helps...
0
 
mdozaAuthor Commented:
I just found out the most of my intended users turn off their browser's cookie capability so CLFLAVA's suggestion wont be necessary.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now