...
Code Block |
---|
var CustomEventHandlers = { setup: function (el) { if (CustomView.hasClass(el, 'extra-submit')) { FEvent.observe(el, 'click', this.autoSubmit.bindAsObserver(this, el)); } }, autoSubmit: function (evt, el) { FlowView.getFlowButton().onclick(); } } |
Prevent Session Timeout
Use the following JavaScript to prevent the browser session from timing out. For example, the tenant session timeout is The tenant session timeout in is set to 30 minutes. One of your forms takes a long time to fill causing out. You want to allow idle periods greater than 30 minutes for that form only. This JavaScript will change the session timeout for this form to 6 hours. Change the variable sessionInterval in the script to the desired time period, for example, a 2 hour session timeout would be:
var sessionInterval = 1000 * 60 * 2; // milliseconds to minutes .
Code Block |
---|
var sessionInterval = 1000 * 60 * 10; // milliseconds to minutes var sessionRefreshURL = "/frevvo/web/login"; refreshFrevvoSession = function () { // make the request var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); // IE7+, Firefox, Chrome, Opera, Safari else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5 xmlhttp.open("GET", sessionRefreshURL + "?sessionRefresh=" + new Date().getTime(), true); xmlhttp.send(); // set the timer to run again setTimeout(refreshFrevvoSession, sessionInterval); } setTimeout(refreshFrevvoSession, sessionInterval); // set the initial timer |
...