I have a pageBlockTable with rows, I want to call function from javascript or write a js function when I click on row.
<apex:pageBlockTable var="c" ...>
<apex:column ../>
<apex:column ../>
<apex:actionSupport event="onRowClick" immediate="true" reRender="" >
// call JS function ex. this.style.backgroundColor = 'yellow';
<apex:param name="cId" value="{!c.Id}" assignTo="{!cId}"/>
</apex:actionSupport>
</apex:pageBlockTable>
Best Answer
You need to use
onsubmit
event of the actionSupport and removeonRowClick
from the pageBlockTable: