<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">&lt;<a href="mailto:pdebruic@gmail.com" target="_blank">pdebruic@gmail.com</a>&gt;</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>
        ^ &#39; if (jqxhr.status == 403) {<br>
            alert(&quot;For security reasons we sign people out during periods of<br>
inactivity. Please sign in again.&quot;);<br>
            window.location.href =<br>
settings.url.split(&quot;?&quot;)[0].replace(&quot;help&quot;,&quot;&quot;);<br>
        } else {<br>
            alert(&quot;This program just broke. You can either try again, sign<br>
out and sign in and try again, or contact us about error: &quot; + exception);<br>
        }&#39;<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&#39;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">&gt; Hi guys,<br>
&gt;<br>
&gt; If I have a session timeout, and then I click on a anchor that is<br>
&gt; associated to a ajax call, it does nothing (which is expected) but it does<br>
&gt; not forward me to the Login page either, as it happens with a timeout and<br>
&gt; a<br>
&gt; normal request.<br>
&gt;<br>
&gt; Any idea how can solve this?<br>
&gt;<br>
&gt; I saw in another email this:<br>
&gt;<br>
&gt;         html document<br>
&gt;                 addLoadScript:<br>
&gt;                         (html jQuery document<br>
&gt;                                 onAjaxError: (self ajaxErrorHandler<br>
&gt; asFunction: #(&#39;event&#39; &#39;jqxhr&#39;<br>
&gt; &#39;settings&#39; &#39;exception&#39;)))<br>
&gt;<br>
&gt; But not sure if it is of help.<br>
&gt;<br>
&gt; Thanks in advance,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Mariano<br>
&gt; <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
<br>
&gt; seaside@.squeakfoundation<br>
<br>
&gt; <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>