Hello all.

I've been using the technique detailed in a blog post by Ray Camden (
http://www.coldfusionjedi.com/index.cfm/2010/9/8/Example-of-handling-session-time-outs-in-an-Ajax-application)
to detect a session timeout during an ajax request and take appropriate
action.  This has been serving me well, but now that I'm starting to have
some problems with it I'm realizing how little I actually know about how it
works.

Let's start with the first issue.  I've been using this technique with
jQuery 1.4.2.  Since upgrading to version 1.5.1 I cannot seem to get the
statusText of the response to be anything other than "error", regardless of
whether there was an actual error or whether the session timed out.  If I
load jQuery 1.4.2 and run the page, the response statusText is
"SessionTimeout" (once the session is actually timed out, of course).
However, if I load jQuery 1.5.1 on that page, the response statusText is
always "error" (again, once the session is timed out - everything works
perfectly until then).  And since my code is looking for the statusText =
"SessionTimeout" to handle an expired session, the user is not notified that
their session is expired.

Relevent CF code here - http://pastebin.com/xPFaX4fx
jQuery code here - http://pastebin.com/CAJDve0k

As you can see in the js code, I'm dumping the XMLHTTPRequest object to the
console so I can see the contents.  I've noticed the contents vary from
1.4.2 to 1.5.1, and this is where I also see the value for statusText.  Is
this just the nature of the beast with jQuery 1.5.1, and we have to find
another way to handle expired sessions when making ajax requests with
jQuery?

Thanks for any help.
Steve


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343117
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to