+ Start a Discussion
hari azmeera 8hari azmeera 8 

how to code in apex when cursor put on the record name in popup it will show details of the record

Sujit Anil NirkheSujit Anil Nirkhe
It cannot be done solely in apex, but using visualforce you can use actionsupport for hover and call some apex method and show details. I hope you will get the idea from this small decription. 
Mehul MakwanaMehul Makwana
It can be done by using <apex:actionSupport> 
<!--  Page: -->
<apex:page controller="exampleCon">
        <apex:outputpanel id="counter">
            <apex:outputText value="Click Me!: {!count}"/>
            <apex:actionSupport event="onclick" 
                                rerender="counter" status="counterStatus"/>
        <apex:actionStatus id="counterStatus" 
                           startText=" (incrementing...)" 
                           stopText=" (done)"/>

/***  Controller: ***/
public class exampleCon {
    Integer count = 0;
    public PageReference incrementCounter() {
            return null;
    public Integer getCount() {
        return count;

JyothsnaJyothsna (Salesforce Developers) 
Hi Hari,

Please check the below sample code.

Visualforce page
<apex:page controller="PopupWindow" showHeader="false">
 <apex:form >
 <apex:pageBlock >
 <apex:pageBlockSection >
 <apex:pageBlockSectionItem >
 <apex:repeat value="{!courses}" var="co">
   <a href="/{!co.Id}" id="{!co.Id}" onblur="LookupHoverDetail.getHover('{!co.Id}').hide();" onfocus="LookupHoverDetail.getHover('{!co.Id}', '/{!co.Id}/m?retURL=%2F{!co.Id}&isAjaxRequest=1').show();" onmouseout="LookupHoverDetail.getHover('{!co.Id}').hide();" onmouseover="LookupHoverDetail.getHover('{!co.Id}', '/{!co.Id}/m?retURL=%2F{!co.Id}&isAjaxRequest=1').show();">{!co.Name}</a>

public with sharing class PopupWindow {

    public List<course__c> getCourses() {
List<course__c> courselist = new List<course__c>();
   courselist = [Select Id, Name,course_fee__c,Duration__c from course__c LIMIT 5];
        return  courselist;


Hope this helps you!
Best Regards,