The session is handled the same with ajax requests as with any other requests. Hard to say what's going on in this case without seeing any code. Presumably the DOM element you are checking for the session value is not something that is being updated by your Ajax call.
Anthony On Wednesday, August 6, 2014 6:14:27 PM UTC+2, Spokes wrote: > > I've got a page in which ajax is used to update the main content (a bunch > of articles), and a variable stored in session is used as an index (let's > say there are X articles per page, and the first article shown corresponds > to the current index). Regardless of how far the user has scrolled, the > value of this session/index variable is shown in *response.toolbar()* as > "0" unless the page is refreshed, or unless a link is clicked. > > I'm not quite sure how the session variable is being handled. It seems to > get updated - otherwise, the scrolling functionality would not do anything. > On the other hand, if I try to access this session variable using something > other than the ajax calls which update the target div, the value of the > session appears to be 0. > > Can someone give me a quick rundown of how session is being handled when > used with ajax, and let me know if there's a way to update it without > refreshing the page? Thank you. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.