• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Jsp - Radio / Checkbox

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
rose hegde
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic