You need to sign in to do that
Don't have an account?
Incorrect Length of checkbox displayed
Hi,
In a VF Component , i am having 10 row of record and corresponding to each row i have a checkbox
so to get the value of no of checkbox checked
i m calling a Java Script function
say
CHECKBOX(){
in which a variable
length = $j("input:checked").length // $j is defined on top as var $j = jquery.noConflict();
}
this JS function is called when
<apex:inputCheckbox rendered="Something" id="SOmething" onclick="CHECKBOX()" />
this works fine and gives me correct length
but recently one more checkbox outside PageBlocktable is added on which no function is called.
but when i check that new checkbox it added to the value of Length variable which is not the desired scenario.
i have a feeling that it might be because of both checkbox being <apex:inputCheckbox type...
but i am not sure.
Please Help
Regards,
Subham
Hi,
I think the region is that VF page component is rendering in html component so when you are clicking on the new outside checkbox of the PageBlocktable your length variable in JavaScript increment
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
ya i get it , so question is how can i stop this. can i stop rendering in to HTML?
Or can i query the length by ID of the checkbox within the table?
or what???