chessdesk - index.php - AJAX Search Code ~ Ajax Training, Learn Ajax Video Tutorials Online, Ajax Examples
Ajax Training, Learn Ajax Video Tutorials Online, Ajax Examples: chessdesk - index.php - AJAX Search Code

chessdesk - index.php - AJAX Search Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>CowAJAX::Chess Desk Example</title>
<script language="javascript" type="text/javascript" src="../../js/ajax.lib.js"></script>
<script language="javascript" type="text/javascript" src="../../js/dhtml.lib.js"></script>
<style type="text/css">

body {font-family: verdana, arial;
font-size: 12px;
}

#main {border: 1px solid red;
width: 640px;
margin: 0 auto;
overflow: hidden;
}

#main div{height: 80px;
width: 80px;
float: left;
font-size: 16px;
text-align: center;
font-weight: bold;
}

.whitebox {background: #FFF;
color: #000;
}

.blackbox {background: #000;
color: #FFF;
}

#php {width: 640px;
margin: 0 auto;
}

#php div{margin-top: 4px;
overflow: auto;
height: 150px;
border: 1px solid gray;
border-style: inset;
}

</style>
</head>
<body>
<!-- Start of Chess Desk -->
<div style="text-align: center">
<a href="controller.php" name="get.changeDesk"><b>Change Me</b></a>
 | 
<a href="controller.php" name="get.reloadDesk"><b>Reload Me</b></a>
</div>
<br />
<div id="main">
<?php

$style[] = 'whitebox';
$style[] = 'blackbox';
$j = 0;
$k = 0;
for($i = 0; $i < 64; $i++) {
if ($j == 8) {
$j = 0;
$k = $k == 1 ? 0 : 1;
}
echo "\n\t\t" . '<div id="box' . $i . '" class="' . $style[($j + $k) % 2] . '">' . ($i+1) . '</div>';
$j++;
}

?>
</div>
<!-- End of Chess Desk -->
<!-- ######################## -->
<!-- Start of PHP source -->
<br style="clear: both"/>
<div id="php">
<b><u>PHP Code</u></b>
<div>
<?php
highlight_file('controller.php');
?>
</div>
</div>
<!-- End of PHP source -->
</body>
</html>

Related Posts by Categories

0 comments:

Useful Links on Adobe Flex

Your Ad Here

Latest Books on Adobe Flex