Board18Players1

From BOARD18 Project WIKI
Jump to: navigation, search
This page has been updated to comply with Release 2.1.x of BOARD18. Go Back

The board18Players1 script contains all of the js functions for the board18Players page except for the Email functions.

Function listReturn(response)

Function listReturn is the success callback function for the ajax playerShow.php call. It appends a list if players to the table in board18Players.php.

Function doPageList()

The doPageList function performs an AJAX call to the playerShow.php function.

Function doPageLinks()

Function doPageLinks creates page links for multi page player list output.

Function playerGames()

Function playerGames uses the BD18.player.games object to append a list if games associated with the player to the leftofpage division in board18Players.php if the player is associated with one or more games.

Function paintPlayer()

Function paintPlayer uses the BD18.player object to create a table of information about a player, to create and display a player dialog and then calls the playerGames function.

Function getReturn(response)

Function getReturn is the success callback function for the ajax playerGet.php call. It initializes the BD18.player object and then it uses the paintPlayer() function to open the player dialog and to append a list if games to the leftofpage division in the board18Players page.

Function playerResult(response)

Function playerResult is the success callback function for the ajax playerUpdate.php call. It processes the response from playerUpdate.php. If 'success' it calls playerGet.php else if not 'fail' it turns on the approperate error text and returns.

Function doPlayer(login)

The doPlayer function performs an AJAX call to the playerGet.php function.

Function updatePlayer()

Function updatePlayer is called by the on-click method of the update button in the theplayer form. It checks the input for missing fields and then does an ajax call to playerUpdate.php.