Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2012, 02:21 PM
Authorized User
Points: 63, Level: 1
Points: 63, Level: 1 Points: 63, Level: 1 Points: 63, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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..




Similar Threads
Thread Thread Starter Forum Replies Last Post
Ex 2-1 TicTacToe zavodney BOOK: Stephens' Visual Basic Programming 24-Hour Trainer 2 May 23rd, 2011 02:57 PM
Nim game wtfitztom C++ Programming 0 November 2nd, 2010 03:19 PM
Game programming. Magxtopher BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 3 September 11th, 2008 09:49 AM
Pong Game Help -XM- BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 4 June 20th, 2007 02:23 PM
STRATEGIE - GAME! WarKrife C++ Programming 1 August 21st, 2003 08:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.