CodeCharge Studio

On Submit event

Applies to

Editable Grid, Record

Description

This event occurs on the client side when the user submits a form but before the data is sent to the server from the form. It can be used for the validation, to confirm the submission or alter control values.

Examples

In this example, a Confirmation Message action is added to the On Submit event of a Record form called Record1. The action causes a message ("Submit form?" ) to be displayed whenever the form is submitted.
<script language="JavaScript">
function page_NewRecord1_OnSubmit() {
  return confirm('Submit form?');
}

function bind_events() {
  check_and_bind('document.NewRecord1','onsubmit',page_NewRecord1_OnSubmit);
  forms_onload();
}

window.onload = bind_events;
</script>


On-line, printable versions and updates