This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Fetching one table cell click and passing it to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic

Fetching one table cell click and passing it to servlet

Navya J Nair

Joined: Apr 04, 2012
Posts: 15
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 :

<style type="text/css">
text-align: center;
text-align: center;

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

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


Matthew Brown

Joined: Apr 06, 2010
Posts: 4339

Please don't post the same message to multiple forums. Thanks!

Duplicate of
It is sorta covered in the JavaRanch Style Guide.
subject: Fetching one table cell click and passing it to servlet
Similar Threads
how show values in jsp from getting database
Getting error
How to getParameter value
How can i get selected radio button value using jsp
Doubts in jsp