Java script is client side and ColdFusion is Serverside.
variables in Javascript are stored in the clients computer memory and variables in ColdFusion are stored on the Webserver so there is no direct access.
Nothing you do in Javascript will effect a variable on the server until the browser makes another request. Your main options are:
To set the value of a hidden form variable in Javascript and ensure that this variable is posted to your next ColdFusion template, the template can then handle setting the session variable.
As above but appending a URL variable to the next template request.
Using a hidden frame and updating the invisible contents of the frame from javascript so that another ColdFusion template is called (wierd but you may have a reason to do this)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.