Site Documentation
This provides information about this team site that is helpful in maintaining it:
Note: this page was created only to help the designer maintain the site, but it is worded in such a way that the
naïve reader might wrongly believe that this page and the code used to implement this site is in the public domain. Readers are reminded
that this site,
including this documentation, is protected by copyright laws, as delineated in this site’s Legal Notices.
Relationship to Other Team Sites
This is one of many team sites created for Mississauga Majors baseball teams. It is also the first team site using a new design
created for the 2007 season, i.e. the design referred to as “Style 2007”. Any other team sites created using this new design will be
modified from this site. Style 2007 was adapted from an earlier design, “Style 2004”, so is similar in many ways,
and indeed even shares some files with those sites, e.g. the image files in directory
img/; see the site map below for details.
Dependency on JavaScript
JavaScript must be enabled for the site to work with Internet Explorer 5 and 6.
JavaScript must be enabled for pages on the site which have information from the schedule.
Site Locations
This team site appears at the following locations:
Note: the team site is deemed to be at the above locations because that is where its home page is, however,
the site shares some files in its parent directories with other team sites, and will not work without those files.
Refer to the site map for a comprehensive list of all the files needed for the site to work.
Site Map
This is a site map. Wildcard characters in filenames are used to identify sets of similar files where there is no need to enumerate
each file. There are links for any files for which further information is available.
Additional Information for Specific Files
This section presents important details about specific files.
Note: several JavaScript functions insert content after a page has been loaded. These functions are typically
called after each page is loaded, but because each function takes an HTML ID as an argument, and does nothing if that ID is not found,
the function does nothing on most pages: only if a tag with the ID is found on a page does the function insert its content.
File /mmba/js/cCalendar*.js
This has JavaScript common to all team sites with a JavaScript controlled calendar.
This was adapted from the cCalendar.js initially developed for the 2007 Toronto Titans concept site.
File /mmba/2007/common.js
This has JavaScript included by all 2007 team pages. This code includes:
The standard cBrowser() class from my personal software library
myEnablePhotos( id )
This function enables (displays) a menuitem in the vertical menubar which is a link to a page with a photo gallery. This assumes that
the menuitem exists, but by default is not displayed because the gallery works only when JavaScript is enabled. This function is
called from within myOnLoad(), and therefore makes the menuitem appear only if JavaScript is enabled. Details:
- Argument
id: the HTML id of a non-displayed LI tag that contains a link to the Photo page.
- Returns: nothing.
The standard cVersion() class from my personal software library
myBrowser
This is a variable of class cBrowser, instantiated with information about the user’s browser.
myInsertPhoto( pathname, id )
This inserts a photo within an HTML tag with the specified HTML id. The intent is that this function be called as the
onclick event for a tag, so that clicking on the content of the tag (typically a thumbnail of a photo) results in the
insertion of a photo elsewhere (typically an enlargement of the photo). Details:
- Argument
pathname: a string containing the pathname to the photo.
- Argument
id: a string with the ID; the default is 'ins_enlargement'.
- Returns:
true if the id was not found; false if it was found.
The standard startList() function from my personal software library
The standard getElement() function from my personal software library
myGraphResults( wins, losses, ties, reg_games, exhib_left, tour_left )
This function saves the data for the season record bar graphs.
The first time this function is called on a page, the data must be for the regular games only; the second time this function is called on a
page, the data must be for all games, including regular, exhibition, and tournament games; this function could be called more than twice from
a page in order to save data for more than two bar graphs, but this capability is not being used.
Details:
- Argument
wins: number of wins.
- Argument
losses: number of losses.
- Argument
ties: number of ties.
- Argument
reg_games: total number of regular games, played and unplayed.
- Argument
exhib_left: if saving the data for the regular games, this and following arguments are not needed,
but if this argument is present, it is the number of the remaining unscheduled postponed games. If saving the data for all the games,
this argument is the number of scheduled unplayed exhibition games.
- Argument
tour_left: if saving the data for all the games, this is the number of upcoming tournaments.
By default this function assumes that about 3 games will be played in each upcoming tournament.
- Returns: nothing, but the data are saved in the array
Graph[].
myGraphShow( id, nGraph )
This function inserts a bar graph for the season record on a page set up for the graph,
using the information previously saved using myGraphResults(). Details:
- Argument
id: a string with the ID of the tag where the HTML for the graph will be inserted.
- Argument
nGraph: the number of the graph, 0 for regular games, and 1 for all games.
- Returns: nothing.
The standard myScrollToAnchor() function from my personal software library
The standard myScrollTo() function from my personal software library
File /mmba/js/gallery.js
This has JavaScript included by all team pages which have photo galleries. This is referred to as class cFilm in my personal software library.
File /mmba/2007/MajorMidget/script.js
This has JavaScript used by this team site only. This code includes:
myOnLoad( nTimeLimit )
This is a function that runs after any page is loaded, e.g. to do things like inserting any dynamic HTML. Details:
- Argument
nTimeLimit: this is the load time, in milliseconds, below which it is assumed that the user has a high speed
Internet connection; the default is 5000, for 5 seconds. If this argument is used, it is used to decide whether to insert content
suitable only for someone with a high speed connection.
- Returns: nothing.
myInsertDate( ed )
This is a function that inserts the current date. Details:
- Argument
ed: a string with the ID of the tag where the HTML for the date will be inserted; the default is 'ins_date'.
If the ID is not found on the page, this function does nothing.
- Returns: nothing.
File /mmba/2007/MajorMidget/sr_*.htm
Files named sr_*.htm are, by convention, pages with special reports. E.g. sr_us_wv.htm is for a special report regarding a tournament
in West Virginia, the Beast of the East tournament. The specific name of such a file is arbitrary, but is typically chosen to include the
location or subject of the thing being reported.