Seems like the question is not so much how to set the cookie value,
but rather how to expire the session when the window is closed, which
is your end goal, right? To the best of my knowledge, there's no good
way to do that. You could use the window onUnload event, but that
fires when you refresh a page, so that's no good.
As for the cookie issue -- turn on output debugging (if it's not on)
and take a look at what's defined in your session scope. There should
be a URLTOKEN key, and you can set a cookie to that value (before or
after manipulating it, because it likely contains
cfid=xxxx&cftoken=xxxxxxxxx). If the cookie's not being set by
setupSession because the sessionID hasn't been set when the cookie
attempt is made, you may need to override setupSession() and add it at
the end.
Dave
On Jul 20, 11:52 am, Eapen <
gea...@gmail.com> wrote:
> I need to change the way Session variables are handled in a live
> application.
>
> I need the session variables to expire when the browser is closed and
> was following Ben's example here:
http://www.bennadel.com/blog/1131-Ask-Ben-Ending-ColdFusion-Session-W...