p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   JSP Basics (http://p2p.wrox.com/forumdisplay.php?f=92)
-   -   Fetching html table cell click event when player enters his move (http://p2p.wrox.com/showthread.php?t=87218)

mike123 April 10th, 2012 02:39 PM

Fetching html table cell click event when player enters his move
 
Hi All,

I am building a TicTacToe game web-services application using jsp and servlet where I need to extract the table's cell onclick event each time for each user and pass is to servlet.

Please help !!! ANY HELP would be immensely appreciated

The code so far I have built is :

</script>
<style type="text/css">
body{
text-align: center;
}
table{
text-align: center;
table-layout:fixed;
}
</style>
</head>

<body>
<form action="TicTacToeGame" method="post">

<table id="board" border=1 align=left cellpadding="2" cellspacing="3" width="250" height="250" >
<tr>
<td> <input type="button" name="11" /> </td>
<td> <input type="button" name="12" /> </td>
<td> <input type="button" name="13" /> </td>
</tr>
<tr>
<td> <input type="button" name="21" /> </td>
<td> <input type="button" name="22" /> </td>
<td> <input type="button" name="23" /> </td>
</tr>
<tr>
<td> <input type="button" name="31" /> </td>
<td> <input type="button" name="32" /> </td>
<td> <input type="button" name="33" /> </td>
</table>
<div>
<input type="submit" name="submit" value="MyMove">
</div>

</form>
</body>

</html>


All times are GMT -4. The time now is 08:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.