function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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:form>
        <apex:outputpanel id="counter">
            <apex:outputText value="Click Me!: {!count}"/>
            <apex:actionSupport event="onclick" 
                                action="{!incrementCounter}" 
                                rerender="counter" status="counterStatus"/>
        </apex:outputpanel>
        <apex:actionStatus id="counterStatus" 
                           startText=" (incrementing...)" 
                           stopText=" (done)"/>
    </apex:form>
</apex:page>	

/***  Controller: ***/
public class exampleCon {
    Integer count = 0;
                        
    public PageReference incrementCounter() {
            count++;
            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>
 </apex:repeat>
 </apex:pageBlockSectionItem>
 </apex:pageBlockSection>
 </apex:pageBlock>
 </apex:form>
</apex:page>

Controller
 
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,
Jyothsna