CodeCharge Studio

On Click event

Applies to

Button, Check Box, Check Box List, Radio Button

Description

This event occurs when the user clicks the left mouse button on the object.

Possible applications: Handling button clicking. Executing custom button actions.

Examples

The following is an example usage of the On Click event. In this case, a Confirmation Message action is added to the On Click event of a Delete button in a Record form called Record1. The following is the code generated for the action (CodeCharge Studio comments are removed):
<script language="JavaScript">
function page_NewRecord1_Delete_OnClick() {
  return confirm('Delete record?');
}

function bind_events() {
  check_and_bind('document.NewRecord1.Delete','onclick', page_NewRecord1_Delete_OnClick);
  forms_onload();
}

window.onload = bind_events;
</script>


On-line, printable versions and updates