Variables that frequently need to be added or updated such as latest pages, events and star ratings are put in a smaller "data.js" file.
Functions specific to one section of the site are in individual "standard.js" files in each section folder.
When only one page uses a special function it is placed in the HTML page. For example the Ex-member pages have functions to write page content (based on data held in "xmem.js")
Types of functions.
Before and while loading
- An error trap to reduce error messages if the script fails. (An admission of defeat!) For one day every year the error reports are redirected to the Contact Centre© so you can send them in for correction. (Please!)
- Write 'includes' that write standard parts of the pages such as the menus and star ratings
- Create layers for right click menu, tooltips and photo galleries.
Straight after loading
- Put tooltip information wherever the names of ex-members appear.
- Mark any links to pages.
- Get a list of the names of people in photographs.
- Disable links to the same page.
Events as a result of viewer action
- Show tooltips
- Slide out the Contact Centre © and pop up other information windows. See the Security help page.
- Provide keyboard shortcuts for navigation.
- Image slides, scrolls, movies and zooms.
- Constants such as date related values.
- Current page information.
- Databases of members, star ratings, new pages, venues of forthcoming meetings.
- Session cookies that reside in memory as long as you are on the site and then are forgotten.
- Site cookies that only this website can write or read. You can alter your browser options to warn you before cookies are set, or block cookies or only permit cookies from specified sites.