Loading

Tuesday, February 12, 2008

chessdesk - controller.php - AJAX Search Code

<?php

require_once('../../lib/xmlajaxresponse.class.php');
require_once('../../lib/request.class.php');

$response = &new XMLAjaxResponse();
$request = &new HttpRequest();

$event = $request->getParameter('event');

if ($event && function_exists($event)) {
$event($request, $response);
}

function changeDesk(&$request, &$response) {

$range = range(0, 63);
shuffle($range);
$boxes = array_slice($range, 0, 8);

foreach($boxes as $box) {
$response->addData('box' . $box, 'Changed<br />' . ($box + 1), 'fadeout');
}

}

function reloadDesk(&$request, &$response) {

for($i = 0; $i < 64; $i++) {
$response->addData('box' . $i, ($i + 1));
}

}

$response->doResponse();

?>

SHARE TWEET

Thank you for reading this article chessdesk - controller.php - AJAX Search Code With URL https://x-tutorials.blogspot.com/2008/02/chessdesk-controllerphp-ajax-search.html. Also a time to read the other articles.

0 comments:

Write your comment for this article chessdesk - controller.php - AJAX Search Code above!