Results 1 to 1 of 1
Thread: Radio button values are not lose
- 12-03-2007, 08:14 AM #1
Member
- Join Date
- Dec 2007
- Posts
- 1
- Rep Power
- 0
Radio button values are not lose
How do I keep Radio button values are not lose them after the Form is submitted
when the form is submitted if some values are not properly entered the old clicked radio button value should be retrived.
How can i achieve the above.
JavaBean:
public void setCusttype (String custtype ) {
this.custtype = custtype ;
}
public String getCusttype () {
return custtype ;
Form in JSP:
<jsp:useBean id="samplereq" class="com.connect.Sample" scope ="request" />
<form method="POST" action="Update.jsp" name="sampleReq" >
<table border="0" align="left">
<tr>
<td class="Txt_gris">
<input type="radio" name="requester" OnClick="sampleReq.requester1.value='supplier'"/>supplier
</td>
<td class="Txt_gris">
<input type="radio" name="requester" OnClick="sampleReq.requester1.value='customer'"/>customer
</td>
<td class="Txt_gris">
<input type="radio" name="requester" OnClick="sampleReq.requester1.value='distributor'"/>distributor
</td>
<td class="Txt_gris">
<input type="radio" name="requester" OnClick="sampleReq.requester1.value='employee'"/>employee
</td>
<td class="Txt_gris">
<input type="radio" name="requester" OnClick="sampleReq.requester1.value='partner'"/>partner
<input type="hidden" name="requester1" value=""/>
</td>
</tr>
</table>
}
Advanced Thanks for all your help.
Regards
Sona
Similar Threads
-
Disable Radio button
By AJG in forum New To JavaReplies: 3Last Post: 05-10-2011, 11:09 AM -
Non functional radio buttons and messed up array
By flameofSuzaku in forum New To JavaReplies: 2Last Post: 01-10-2011, 05:38 PM -
Accessing boolean Values of another values in one class.
By a_iyer20 in forum Advanced JavaReplies: 4Last Post: 04-15-2008, 01:04 PM -
Setting the label of radio buttons from Resource bundle
By rajeeshankar in forum JavaServer Faces (JSF)Replies: 0Last Post: 12-17-2007, 09:23 AM -
property for radio buttons
By swapnanair in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 12-03-2007, 08:39 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks