Solved

Referencing ColdFusion session variables in javascript code

Posted on 2008-10-01
2
2,395 Views
Last Modified: 2012-05-05
How do I reference the coldFusion session variable in javascript. My attempt is shown below.
<script type="text/javascript">
	function handleClick(OffID, SeqID){
 
		//store the selOffers and selSeqOffers in session
		Session.selOffers = selOffers;
		Session.selSeqOffers= selSeqOffers;}
	</script>

Open in new window

0
Comment
Question by:onaled777
2 Comments
 
LVL 18

Assisted Solution

by:Plucka
Plucka earned 200 total points
ID: 22612886
You can't CF session variables are stored on the server.

You could do it via ajax call to a cfc, but not directly.
0
 
LVL 19

Accepted Solution

by:
erikTsomik earned 300 total points
ID: 22613615
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now