Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to transfer the table data as a parameter?

Status
Not open for further replies.

royboy75

Programmer
Feb 13, 2007
114
GB
Hello,

I have a table looking something like this:
Code:
<tr>
 <td> A </td>
 <td> <a href="page.jsp"></a>
</tr>
<tr>
 <td> B </td>
 <td> <a href="page.jsp"></a>
</tr>
[code]

I would like to transfer to the jsp as a parameter the content of the <td> tag (A and B in this case).
How can I do it?
 
Not sure what you're exactly trying to do, but at first sigth you just need to include the table in a form.

Cheers,
Dian
 
What I am trying to achieve is this:
I have a table with a data cell and a link cell. I would like to use the string in the cell as the title in the 2nd page and for that I need to transfer it with the URL. I don't see how this link helps me...
Can you perhaps elaborate this with a simple code example?

Thanks,
Roy
 
please post the entire code of the pages, then we can give you the solution infact the entire solution.
 
Code:
<table>
<tr>
<td> Hello </td>
<td> <a htref="someJSP.jsp"> </a></td>
</table>

I would like to concatenate the "Hello" to the URL as a parameter.
 
Code:
<table>
<tr>
<td> Hello </td>
<td> <a htref="someJSP.jsp?param=Hello"> </a></td>
</table>

Cheers,
Dian
 
Dian,

No, I want to dynamically take it, I don't want to hardcode it. I think I need to give the <td> a name or id and than access it's data from JSP. That's what I am aiming for.
 
Include the table in the form, and set the action of the form to the JSP, as shown in the tutorial.

Cheers,
Dian
 
Here's a clue. You need to use <input> tags in those parts of your <form> which contain (or accept from the user) data to be POSTed to the web server. The POST won't just suck up any trivial piece of HTML content.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top