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
Apex Code DevelopmentApex Code Development 

Problem in Hovering over a record.

Hi Folks,

 

This is the code used for Hovering over a record.

Hovering is getting possible,but we are  unable to show the record details on Hover.we are unable to pass the id of the record on Hovering over a record using onMouseOver() event...

 

Provide me some suggestions how to capture the id and pass it into a fuction in a java script on onMouseOver().

 

 

 

<apex:page controller="DisplayActivities">
    <script src="/soap/ajax/13.0/connection.js"></script>
    <script type="text/javascript">

        function fun(var Id){        
        alert('vamsi');
            
           <!-- var productquery1 = sforce.connection.query("select Custom_ActivityDate__c,Subject from Task where Id=:{!activities.Id}");-->
        }
    </script>
    <apex:pageblock >
        <apex:pageblocktable value="{!activities}" var="b">
            <apex:image url="{!URLFOR($Resource.images, '1.JPG')}" />
        </apex:pageblocktable>
        <apex:pageblocktable value="{!activities1}" var="c">
        </apex:pageblocktable>
        <apex:pageblocksection title="July Tasks">
            <apex:repeat value="{!activities2}" var="cc1">
                <apex:image url="{!URLFOR($Resource.images, '1.JPG')}" width="25" height="38" onMouseOver="fun()"/>
            <!--    <a href="/{!cc1.Id}"><b onmouseover="LookupHoverDetail.getHover('{!cc1.Id}').show();" >{!cc1.Subject}</b></a>&nbsp;&nbsp;&nbsp; -->
                
                
                <div class="" onblur="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onfocus="MRUHoverDetail.getHover('{!cc1.Id}').show();"
                                       onmouseout="MRUHoverDetail.getHover('{!cc1.Id}').hide();"
                                       onmouseover="MRUHoverDetail.getHover('{!cc1.Id}').show();">
                    <div class="mruItem" id="mru{!cc1.Id}">
                        <a href="/{!cc1.Id}" class="leadMru" accesskey="1" title="[Alt+1]">
                        <img src="/s.gif" alt="Task"  class="mruIcon" title="Task"/>
                        <span  class="mruText" onMouseOver="fun({!cc1.subject})">{!cc1.subject}</span>
                    </a>
                    </div>
               </div>
                
                
                
                
                <apex:outputfield value="{!cc1.Custom_ActivityDate__c}"/>
            </apex:repeat>
        </apex:pageblocksection>
        <apex:pageblocksection title="July Events">
            <apex:repeat value="{!activities3}" var="cc2">
                <apex:image id="name" url="{!URLFOR($Resource.images, '6.JPG')}" width="25" height="38" alt="July Events"/>
                
                
                <div class="" onblur="MRUHoverDetail.getHover('{!cc2.Id}').hide();"
                                       onfocus="MRUHoverDetail.getHover('{!cc2.Id}').show();"
                                       onmouseout="MRUHoverDetail.getHover('{!cc2.Id}').hide();"
                                       onmouseover="MRUHoverDetail.getHover('{!cc2.Id}').show();">
                    <div class="mruItem" id="mru{!cc2.Id}">
                        <a href="/{!cc2.Id}" class="leadMru" accesskey="1" title="[Alt+1]">
                        <img src="/s.gif" alt="Task"  class="mruIcon" title="Task"/>
                        <span  class="mruText">{!cc2.subject}</span>
                    </a>
                    </div>
               </div>

                
                
                <apex:outputField value="{!cc2.Custom_ActivityDate__c}"/>
                            &nbsp;&nbsp;&nbsp;
            </apex:repeat>
            <br/>
        </apex:pageblocksection>
    </apex:pageblock>
</apex:page>

 

 

Regards,

Jagadeesh K

 

 

 

 

 

Chamil MadusankaChamil Madusanka

Hi,

 

Try this example

 

http://salesforceworld.blogspot.com/2011/08/displaying-pop-up-summaries-on-hover-in.html

 

chamil's blog

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.