Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

In struts el how to get checkbox status

 
suneel surya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In struts el how to get checkbox status with java script, i want to know weather the check box is checked or not
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that JavaScript always acts upon the rendered html sent back to the browser after all variables have been resolved and all custom tags processed. That means you're dealing with a plain HTML <input type="checkbox" > control. The Struts tag attribute property translates to the HTML attribute name. Also, the Struts attribute styleId translates to the HTML attribute id. Therefore, with a tag like this:

you can use the following JavaScript code:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic