Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Auto Control Validation

' Quantity  has built-in validation that will instantaneously display an error message and change the control color to red when invalid values are entered. For Example, the Quantity control allows only whole numbers. An  An error message will display if a number with a  decimal point value is entered. The forms designer can restrict users from entering a value with a decimal point using this JavaScript. This script will automatically remove a decimal point from the field and the error message will not display.  Similar Similar logic can be used to implement instant validation on other control types as well.

...