File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply 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: 14460
    
    7

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: 14460
    
    7

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: select the chekbox generated at runtime of jsf page using javascript
 
Similar Threads
Checkboxes in servlets?
Need Help with binding click events to table rows
problem in select
How to get Names of selected checkboxes?
save checked value in checkbox to database