The only way to set a CF variable from JS is to have some kind of page
reload. For example, via JavaScript, you can make the page reload while
appending URL vars. So, I can make the page go from index.cfm to
index.cfm?var=X, where X is some JS value. CF would then be able to look
at url.var. If you don't want the page to reload, you can use hidden
frames, iframes, layers, etc, but, the point is, since JS is client
side, you MUST have some kind of communication back to the server in
order to give the data to CF.

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Perez, Bismark [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, November 29, 2001 9:42 AM
> To: CF-Talk
> Subject: Setting session variables using JavaScript
> 
> 
> Hello there,
> 
> Is it possible to set the value of a session variable using 
> JavaScript,  the
> scenario is the following, I have a page that opens a window 
> where the user
> can select a value from a select box, the form "action" is 
> actually call to
> a JavaScript function that refresh the opener window where I 
> do some DB
> retrieve based on the value of the session variable, this is 
> why I need to
> set the session variable inside the JavaScript function.
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to