Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Iam tryin to do hovering in pageblocktable by using minipagelaoyout.

Now I could able to get hovering in few records where i do not scroll.But the problem comes with when I scroll the table and try to hover it.

instead of showing hovering page next to link,Its showing in relative position.

What should I do to get out from this problem.

The code that I used is

<apex:column  >
<apex:facet name="header">Account FirstName</apex:facet>
<a href="/{!acc.Id}"
id="{!acc.Id}"
position="relative"
onblur="LookupHoverDetail.getHover('{!acc.Id}').hide();"
onfocus="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();"
onmouseout="LookupHoverDetail.getHover('{!acc.Id}').hide();"
onmouseover="LookupHoverDetail.getHover('{!acc.Id}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();">
{!acc.Account_First_Nmae__c}
</a>
</apex:column>

regards, K.Arun

share|improve this question
2  
Ive tried your code and it works for me realy good. What is the problem? Could you post a screenshot? –  mast0r Feb 11 '13 at 12:21
    
@mast0r As I said that Problem doesnt come when we have small list. When we have a list to scroll in pageblocktable then the pagesize increases. –  Arun SFDC Feb 15 '13 at 8:20

2 Answers 2

If the problem is that the mini page layout or whatever it is that you are trying to hover appears in the wrong spot it could be due to the same link being on the page more than once and the code using the same ID for both links. The hover will appear over the first one every time. See Mini Page Layout CSS in Visualforce Page for more information.

share|improve this answer

I figured out a workaround where you can explicitly make each id unique.

If you use a element you be able to make each id unique such that the hover float over that particular element.

<apex:variable var="uniqueNum" value="{!0}/>
<apex:repeat value="{!accList} var="acc">
<apex:variable var="accIdUnique" value="{!acc.Id}{!uniqueNum}"/>
<a href="/{!acc.Id}"
  id="{!accIdUnique}"
  onblur="LookupHoverDetail.getHover('{!accIdUnique}').hide();"
  onfocus="LookupHoverDetail.getHover('{!accIdUnique}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();"
  onmouseout="LookupHoverDetail.getHover('{!accIdUnique}').hide();"
  onmouseover="LookupHoverDetail.getHover('{!accIdUnique}', '/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1').show();">
{!acc.Name}
</a>


<apex:variable var="uniqueNum" value="{!uniqueNum + 1}/>
</apex:repeat>

As you can see the uniqueNum variable strings onto the id of the iterated account list making every row with the anchor tag unique and therefore you be able to hover across it.

Thanks. Regards, Joey Ho

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.