• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

select the chekbox generated at runtime of jsf page using javascript

 
Amit K Jain
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

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.

Please advise.

Regards
Amit
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Amit K Jain
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks
Amit

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic