TicTacToe game
Hi all,
I am developing tictactoe 3*3 grid game using jax webservices and it should work for 500 users and make use of mysql database in order to save moves of each player i.e 'X' and '0' for player1 and player2.The client development is done by using jsp/servlet pair.
My question is how to make use of ajax for retaining page when user logins and give him access to make "X" in one of the cell.
Here is my html page:
<body>
<table border=1 align=left cellpadding="2" cellspacing="3" width="250" height="250" id="board" >
<tr>
<td id="cell1" onclick="getMove();"></td>
<td id="cell2" onclick="getMove();"></td>
<td id="cell3" onclick="getMove();"></td>
<td><input type="button" onclick="getMove()" ></td>
</tr>
<tr>
<td id="cell4" onclick="getMove();"></td>
<td id="cell5" onclick="getMove();"></td>
<td id="cell6" onclick="getMove();"></td>
</tr>
<tr>
<td id="cell7" onclick="getMove();"></td>
<td id="cell8" onclick="getMove();"></td>
<td id="cell9" onclick="getMove();"></td>
</tr>
</table>
<div><b> Sign Up for New Account </b></div><br>
<form id="form1" method="post" action="SignUp" >
<div class="form-row"><span class="label">UserName *</span><input type="text" name="user" /></div>
<div class="form-row"><span class="label">Password *</span><input type="password" name="pass" /></div>
<div class="form-row" id="retainPage"><input class="submit" type="submit" value="Submit" id="submit" onclick="retainLoginPage()"></div>
</form>
</body>
</html>
Please help!!!
Last edited by mike123; April 9th, 2012 at 01:55 PM..
|