|This page has been updated to comply with Release 2.1.x of BOARD18.||Go Back|
The board18Games script contains all of the js functions for the board18Games page.
Function listReturn is the success callback function for the ajax gameShow.php call. It appends a list if games to the table in board18Games.php.
The doPageList function performs an AJAX call to the gameShow.php function.
Function doPageLinks creates page links for multi page game list output.
Function gamePlayers uses the BD18.game.players object to append a list of players associated with the game to the space under the game dialog in the board18Games page if the game is associated with one or more players.
Function paintGame uses the BD18.game object to create a table of information about a game, to create and display a game dialog and then calls the gamePlayers function.
Function getReturn is the success callback function for the ajax gameGet.php call. It initializes the BD18.game object and then it uses the paintGame() function to open the game dialog and to append a list if players to the space under the game dialog in the board18Games page.
Function gameResult is the success callback function for the ajax gameUpdate.php call. It processes the response from gameUpdate.php. If 'success' it calls gameGet.php else if not 'fail' it turns on the approperate error text and returns.
The doGame function performs an AJAX call to the gameGet.php function.
The findGame function searches the BD18.games array to find the gameid of the game with a given gname. It then calls doGame with it.
Function updateGame is called by the on-click method of the update button in the thegame form. It checks the input for missing fields and then does an ajax call to gameUpdate.php.