thewall. server.phpExample which demonstrates a xajax implementation of a graffiti wall. Summary
Graffiti Wall ExamplePlease see copyright.inc.php for a detailed description, copyright and license information. graffitiSummary
isValid
Indicates that the html generated for this request is valid and can be added to the wall DATA_FILE. save
Writes the current graffiti->html to the DATA_FILE when graffiti->isValid or returns an error message. xajax request handlersSummary
scribble
Processes the users form input and passes the values to an instance of the graffiti class. If the graffiti class generates and error, it is returned to the browser using <xajax->alert>, otherwise, <xajax->script> is used to instruct the browser to make a request to updateWall and <xajax->clear> is used to clear the form input. updateWall
Processes the data previously written to the DATA_FILE by graffiti->save. |
Stores the html that is being generated for the current request.
var $html
Indicates that the html generated for this request is valid and can be added to the wall DATA_FILE.
var $isValid
Builds the html output and sets the isValid indicator.
function graffiti( $sHandle, $sWords )
Generate a font size based off a random number.
function getRandomFontSize()
Generate a browser safe color based on a random number.
function getRandomColor()
Generates a text-alignment value based on a random number.
function getRandomAlignment()
Writes the current graffiti->html to the DATA_FILE when graffiti->isValid or returns an error message.
function save()
Processes the users form input and passes the values to an instance of the graffiti class.
function scribble( $aFormValues )
Processes the data previously written to the DATA_FILE by graffiti->save.
function updateWall()