CodeCharge Studio

On Load event

Applies to

Button, Check Box, Editable Grid, Hidden, List Box, Page, Record, Text Area, Text Box



The following is an example of the minimum length validation for a Text Box called Textbox2 which is located within a Record form called NewRecord2. In this case, a Validate Entry action is added to the On Load event with the following settings:

Validate Entry
Minimum Length8
Maximum Length 
Input Mask 
Regular Expression 
Error MessageMinimum length: 8
Validation Function 

As a result the generated code will be as follows (CodeCharge Studio comments are removed):
<script language="JavaScript">
function page_NewRecord2_TextBox2_OnLoad() {
  var result;
  this.ccsRequired = true;
  this.ccsMinLength = 8;
  this.ccsErrorMessage = "Minimum length is 8";
  this.ccsCaption = "";
  return result;

function bind_events() {

window.onload = bind_events;

On-line, printable versions and updates