| 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..
|
 |
 |
|
|
subject: Jsp - Radio / Checkbox
|
|
|