Javascript Programming Guide - jcobban/Genealogy GitHub Wiki

Up: Home

The dynamic functionality of the page is implemented in the file “pageName.js” in the same directory folder as the PHP script.

There is a library of utility functions used to present a common appearance implemented in /jscripts/util.js for older code which does not support ES2015 and in /jscripts6/util.js for code which has been rewritten to exploit the new capabilities of ES2015, particularly import and export control.

This file includes:

  • common functionality for displaying popup or modal dialogs, including element specific help, and alerts. A Help dialog appears if you click on an input field, press the F1 key while the focus is on a form element, or hover the mouse over a form element for 2 seconds.
  • To avoid making the family tree editing experience too confusing the edit window is tiled into two sub-windows so the user can always see not only the current editing window, but also the window from which the current window was opened.
  • Common keystroke and mouse behavior.

For each form element the application-specific script called once the page is loaded initializes the dynamic functionality of each element.

Table of Contents

Next: HTML Template Guide