<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 29, 2015 at 3:27 PM, Paul DeBruicker <span dir="ltr"><<a href="mailto:pdebruic@gmail.com" target="_blank">pdebruic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mariano,<br>
<br>
Thats something I wrote. The #ajaxErrorHandler method goes like this:<br>
<br>
<br>
ajaxErrorHandler<br>
^ ' if (jqxhr.status == 403) {<br>
alert("For security reasons we sign people out during periods of<br>
inactivity. Please sign in again.");<br>
window.location.href =<br>
settings.url.split("?")[0].replace("help","");<br>
} else {<br>
alert("This program just broke. You can either try again, sign<br>
out and sign in and try again, or contact us about error: " + exception);<br>
}'<br>
<br>
<br>
the window.location.href line just cleans up the page url by removing the<br>
expired session info. Seaside then starts a new session and the url is sent<br>
through the #initialRequest: mechanism. In #initialRequest: for my<br>
application I detect which page they were on, show them the login page, then<br>
once they've authenticated show them the page they were on.<br>
<br></blockquote><div><br></div><div>Thanks Paul!!! That did work perfectly. </div><div><br></div><div>Thank you very much. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Hope this helps<br>
<br>
<br>
Paul.<br>
<br>
<br>
<br>
<br>
<br>
<br>
Mariano Martinez Peck wrote<br>
<div><div class="h5">> Hi guys,<br>
><br>
> If I have a session timeout, and then I click on a anchor that is<br>
> associated to a ajax call, it does nothing (which is expected) but it does<br>
> not forward me to the Login page either, as it happens with a timeout and<br>
> a<br>
> normal request.<br>
><br>
> Any idea how can solve this?<br>
><br>
> I saw in another email this:<br>
><br>
> html document<br>
> addLoadScript:<br>
> (html jQuery document<br>
> onAjaxError: (self ajaxErrorHandler<br>
> asFunction: #('event' 'jqxhr'<br>
> 'settings' 'exception')))<br>
><br>
> But not sure if it is of help.<br>
><br>
> Thanks in advance,<br>
><br>
><br>
><br>
> --<br>
> Mariano<br>
> <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
><br>
</div></div>> _______________________________________________<br>
> seaside mailing list<br>
<br>
> seaside@.squeakfoundation<br>
<br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/Ajax-requests-not-redirecting-to-Login-page-after-session-timeout-tp4802509p4802521.html" target="_blank">http://forum.world.st/Ajax-requests-not-redirecting-to-Login-page-after-session-timeout-tp4802509p4802521.html</a><br>
Sent from the Seaside General mailing list archive at Nabble.com.<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>