Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Status of Checkbox with JSP  RSS feed

 
sree visu
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know whether there is a better Idea to know the status of the checkbox(whether it is checked or not).My idea is to have a hidden field and change its value via javascript so that it may be altered.Any suggestions would really help me

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to know on the client side(in browser) you can use JavaScript and access checkbox property (checked).
On the server side you can use its value property (mapped to your bean).
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just get its value by HttpServletRequest#getParameter() the usual way?
 
sree visu
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bauke Scholtz and Vishal pandya for your reply

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome sree.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!