This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes send appropriate row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "send appropriate row" Watch "send appropriate row" New topic
Author

send appropriate row

Prashanth reddy
Greenhorn

Joined: Aug 17, 2005
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60800
    
  65

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: send appropriate row
 
Similar Threads
Error comes whilke compiling the jsp page
getting selected values from a list
spaces while populating using s:iterator
Horizontal scrollbar problem
Help me about html:select