Vital Statistics BirthRegDetail.js - jcobban/Genealogy GitHub Wiki

Up: Vital Statistics Implementation

Source Code

This script implements the dynamic functionality of the page BirthRegDetail.php.

When the page is loaded the dynamic functionality of all of the fields is established:

  • The selection list of counties is initialized from the server.
  • Abbreviation tables are added to many input fields.
  • If the parameter showimage is "yes" the window is split and the associated image is presented in the right half of the window.

The script takes additional actions when some fields are changed:

Field Name Action
FatherName If the 'Informant' field contains the default value then it is set to the new value of 'FatherName'. If the 'Surname' field is empty it is set to the last word in the 'FatherName'.
FatherOccupation If 'FatherOccPlace' is empty it is set to the default location string for the current township.
InformantRel If this is set to 'Mother', including by expansion of the abbreviation 'M', then 'Informant' is set to all but the last word of 'MotherName' plus the last word in 'FatherName'.

Next: BirthRegDetail.php