Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

Fetching one table cell click and passing it to servlet

 
Navya J Nair
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All,

Please help !!!

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.

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>
 
Matthew Brown
Bartender
Posts: 4566
8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same message to multiple forums. Thanks!

Duplicate of http://www.coderanch.com/t/573099/Servlets/java/Fetching-one-table-cell-click
 
    Bookmark Topic Watch Topic
  • New Topic