aspose file tools*
The moose likes JSP and the fly likes Jsp - Radio / Checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Jsp - Radio / Checkbox" Watch "Jsp - Radio / Checkbox" New topic
Author

Jsp - Radio / Checkbox

rose hegde
Ranch Hand

Joined: Oct 22, 2003
Posts: 40
Hi,
Thru jsp page with backend java i am inserting data from a form into the database.The form consists of textfields,radio button and checkbox.Values r inserted properly.
I retrieve the data to modify a single row of fields.All the values in the text field are retrieved.But when it comes to radio button or checkbox they r not clicked as per the value in the database.
Pls help.
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Originally posted by rose hegde:
Hi,
Thru jsp page with backend java i am inserting data from a form into the database.The form consists of textfields,radio button and checkbox.Values r inserted properly.
I retrieve the data to modify a single row of fields.All the values in the text field are retrieved.But when it comes to radio button or checkbox they r not clicked as per the value in the database.
Pls help.

rose-
you need to provide more information. saying "But when it comes to radio button or checkbox they r not clicked as per the value in the database. means nothing to us ....
how are you retrieving these values, can you post a code snippet?


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
rose hegde
Ranch Hand

Joined: Oct 22, 2003
Posts: 40
In the jsp page while retrieving for text field i write ...(accessing from database thru java...i have written a function in hava called getleaverecord...)
<input name="txtdays" type="txtdays" id="txtdays" value="<%=leaveHandler.getleaverecord(Integer.parseInt(i),3)%>" >
which works fine...
but for checkbox when i write the same thing
<input type="checkbox" name="credit" value="<%=leaveHandler.getleaverecord(Integer.parseInt(i),5)%>">
it doesnt work....
so now can u help...if u did not get the Q ask me..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jsp - Radio / Checkbox
 
Similar Threads
Multiselect radiobuttons
JSP Radio /CheckBox
Clearing checkboxes
Remembering the radiobtn/checkbox state between jsp pages
Checkbox