You need to sign in to do that
Don't have an account?
Getting Field Values on Mouse Hover in Pageblocktable row
HI,
Can it be possible, whenever I am doing mouse hover in a row present in the pagseblocktable, it will capture the record id as well as other field values present in that row.
Thanks,
SAKTI
Can it be possible, whenever I am doing mouse hover in a row present in the pagseblocktable, it will capture the record id as well as other field values present in that row.
Thanks,
SAKTI
On VF Page,
function Test(vname,vid)
{
alert("Name of the record is "+ vname + " and the record id is " +vid);
}
<apex:form id="frm_id" >
<apex:pageBlock id="pgblk_id">
<apex:pageBlockTable value="{!incidents}" var="Inc" id="tbl_id" border="1" onRowClick="Test('{!Inc.name}','{!Inc.Id}')">
<apex:column headerValue="Name" id="clm_id" >
<apex:outputLink value="javascript:void(0);" onclick="window.open('/{!Inc.id}');"></apex:outputLink>
</apex:column>
................
..................
.................
</apex:page>
All Answers
Hi,
It is possible. Please ifnd the below sample code.
<apex:page standardController="Case" recordSetVar="usr" >
<apex:pageBlock >
<apex:pageBlockTable value="{!usr}" var="usa" id="usrblock">
<apex:column headerValue="Name" >
<a id="{!usa.Id}"
onmouseover="LookupHoverDetail.getHover('{!usa.Id}', '/{!usa.Id}/m?retURL={!usa.Id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('{!usa.Id}').hide();"
onfocus="LookupHoverDetail.getHover('{!usa.Id}', '/{!usa.Id}/m?retURL={!usa.Id}&isAjaxRequest=1').show();"
onblur="LookupHoverDetail.getHover('{!usa.Id}').hide();"
href="/{!usa.Id}">
{!usa.Id}
</a>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Sorry for the late reply. I was out of station. As per your suggestion, it shows me mouseover mini page layout.
But what I need was, I have a detail page layout just below the list view. When I just pass mouse pointer over a record, it will capture the record field details and will show in the detail page below.
Here let say I just pass the pointer to the fist record. Now as per my code, it changes the record by yellow color. The fields that available in the record, should be display to my another detail vf page. Here the detailed page, I am capturing through iframe.
Thanks,
SAKTI
On VF Page,
function Test(vname,vid)
{
alert("Name of the record is "+ vname + " and the record id is " +vid);
}
<apex:form id="frm_id" >
<apex:pageBlock id="pgblk_id">
<apex:pageBlockTable value="{!incidents}" var="Inc" id="tbl_id" border="1" onRowClick="Test('{!Inc.name}','{!Inc.Id}')">
<apex:column headerValue="Name" id="clm_id" >
<apex:outputLink value="javascript:void(0);" onclick="window.open('/{!Inc.id}');"></apex:outputLink>
</apex:column>
................
..................
.................
</apex:page>