You need to sign in to do that
Don't have an account?

How to get the ID of the selected record in enhanced list used in a vf page?
I am using apex:enhanced list to show list of accounts in a vf page. Each time on click of checkbox for a record I want to get the id of that particular record. i tried using jquery.But its not working. I tried some thing like this:
<apex:page >
<script type="text/javascript" src="{!URLFOR($Resource.jquery132js)}"/>
<script type="text/javascript" src="{!URLFOR($Resource.Jquery171)}"/>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j( ":checkbox" ).click(function( objEvent ){
if(this.value!='')
{
if(this.checked) {
alert( this.value);
}
else{alert('Unchecked----'+this.value);}
}
});
});
</script>
<apex:enhancedList type="account" height="400"/>
</apex:page>
If you have any other javascript or jquery code to capture the click event of checkbox which can solve this problem. please share .
Thanks in advance.