• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

send appropriate row

 
Prashanth reddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I written a jsp with few rows of data.i need to send exact row data to the next page.Here is my code
<FORM name="myform" method="get" action="senddata.jsp">
<TABLE width="75%" border="0">
& lt;TBODY>
<%for(int i=0;i<4;i++){
%>
< TR>
< TD width="79"><INPUT type="submit" name="delete" value="Delete" onKlick='callDelete();return false'></TD>
< TD align="center" width="148" ><INPUT type="text" name="bankCd" id="bankCd"
value="111" >& lt;/TD>
< TD align="center" width="185">& lt;INPUT type="text" name="augProdCd" id="augProdCd"
value="001" size="11" /></TD>
< TD align="center" width="183">
< SELECT name="subProdCd" id="subProdCd">
< OPTION value=001 >001</OPTION>
< OPTION value=001 >002</OPTION>
< OPTION value=003 >003</OPTION>
</SELECT></TD>
</TR>
<%} %>
</TBODY>
</TABLE>
</FORM>


Problem : If i click Delete button on any row is sending all form values to the next page.but i need to send only the values corresponding to that delete button

Please anybody can help this ???(any thing I can write in javascript function callDelete()....I am new to javascript..i donno all the functions or methods)
Please send me the sample code how to procede further...
Thank You
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps make each row its own form?

or

Have a hidden form which you populate from the row data and then submit.

In any case, this is a matter of formatting your HTML and Javascript appropriately and is not a JSP issue.

Also, please, when posting code, be sure to use the UBB code tags.
[ December 11, 2006: Message edited by: Bear Bibeault ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic