Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

checkbox in jsp! urgent!!!!!!!!

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
How do we check whether a checkbox( from html) is checked or not in jsp file. Urgent!!!
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IF the checkbox is checked, the POST (or GET) name-value pair that will be returned is:
CheckBoxName=ON
where
<INPUT TYPE="CHECKBOX" NAME="CheckBoxName">

If it's not checked there will be nothing returned for the name "CheckBoxName". In a servlet, the parameter value will be null because it's not there... And it will be "ON" if checked.
[This message has been edited by Tony Alicea (edited August 24, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic