This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSF and the fly likes select the chekbox generated at runtime of jsf page using javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "select the chekbox generated at runtime of jsf page using javascript" Watch "select the chekbox generated at runtime of jsf page using javascript" New topic
Author

select the chekbox generated at runtime of jsf page using javascript

Amit K Jain
Ranch Hand

Joined: Nov 06, 2008
Posts: 55

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

Joined: Jun 25, 2001
Posts: 17011
    
  26

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Amit K Jain
Ranch Hand

Joined: Nov 06, 2008
Posts: 55
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

Joined: Jun 25, 2001
Posts: 17011
    
  26

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.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: select the chekbox generated at runtime of jsf page using javascript
 
It's not a secret anymore!