Can someone please help me selecting the checkbox using javascript? Belew is the view source of the JSF form. On clicking the first checkbox another one should get selected automatically.
I tried to get the value of the checkbox, however, it doesn't work.
That's not a JSF form. It doesn't use JSF tags and doesn't bind to a JSF backing bean. It's just plain old HTML.
JavaScript's interactions with checkboxes is done using the "checked" property, I think. Not the "value" property.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Thank you Tim for the response.
Yes. This is not JSF form but the view source of the page created after rendering the JSF page. I have resolved this problem using checked property of the checkbox.
Amit K Jain wrote:Thank you Tim for the response.
Yes. This is not JSF form but the view source of the page created after rendering the JSF page.
Sorry. I missed those 2 key words (view source). Doesn't matter. Same solution either way. Anyway, all fixed.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, that will fit in a stocking