Duh. Client v server. Somedays, I tell ya. I will use my option in #1 there.
-------------------------------------------------------- Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: www.ejhassociates.com tel: 651.207.1526 fax: 651.207.1536 mob: 651.245.2717 -------------------------------------------------------- This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not [email protected] you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------------------------------------------------- -----Original Message----- From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 9:10 AM To: CF-Talk Subject: RE: Set session variables in JS? Eric, >Is there a specific or easy way to set session variables while in the >middle of a javascript routine? I can't seem to recall...thanks. JavaScript executes on the client where as CF executes on the server. You can't have JavaScript directly affect the outcome of the current running template. That means you can't do: var aJSVariable = prompt("Your name:"); <cfset session.name = aJSVariable /> Now that's not to say that you can't use JavaScript to change the value of a session variable for sequential requests. There are a couple of ways to accomplish this, but they are revolve having the browser talk back to the server: 1) Update a form variable and then submit the form back to the server. 2) Use a hidden iframe to post back to a fixed URL to update the server. 3) Use the Image() object in JS to post to a fixed URL to update the server. 4) Use AJAX to update the server. -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230959 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

