mhmda Posted January 2, 2013 Posted January 2, 2013 How can I redirect the user to "www.google.com" on session timeout? thanx, Quote
gerhard.kimmeringer Posted January 2, 2013 Posted January 2, 2013 http://forums.unigui.com/index.php?/topic/1226-question-about-sessiontimeout/ http://forums.unigui.com/index.php?/topic/2189-redirect-at-close/page__p__9764__hl__redirect__fromsearch__1&do=findComment&comment=9764 Quote
mhmda Posted January 2, 2013 Author Posted January 2, 2013 Ok i did it by following this article: http://forums.unigui.com/index.php?/topic/1226-question-about-sessiontimeout/ BUT I want it to be automatic , I mean when the time is up the app auto redirect to specific page, for example google.com!! Quote
mhmda Posted January 3, 2013 Author Posted January 3, 2013 Hi, I manage to do it... 1. create a .js file with this content: var sessionTimeout = 11;//in seconds var sesioncounter = 11; function DisplaySessionTimeout() { sesioncounter = sesioncounter - 1; if (sesioncounter >= 0) { window.setTimeout("DisplaySessionTimeout()", 1000); } else { sesioncounter=sessionTimeout; window.location = "http://www.google.com";//in timeout redirect to google } } DisplaySessionTimeout(); 2. attach the file to "servermodule": 3. add this code to every form (ClientEvents--> UniEvents --> OnAjaxRequest): That is it... give it a try Maybe there is more efficient way, but for now it's working good for me... 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.