+ Start a Discussion
B2000B2000 

Emulate Field Level Help

I am trying to emulate the Field-Level Help in an HTML table. I don't want to use the PageBlockSectionItem method.  I am using a JavaScript example someone posted here which creates a popup window.  The onmouseover event successfully creates a new window, but the onmouseout event does not close it.  Any suggestions.  Thanks

 

<table>
<tr>                    
<td width="20%" style="font-weight:bold;">Account
<apex:image value="/s.gif" styleClass="helpOrb" title="" onmouseover="openWin('{!$ObjectType.ATP_Account_Plan__c.fields.Account__c.inlineHelpText}');" onmouseout="closeWin();"/>    
</td>
<td><apex:inputField value="{!newAccPlan.Account__c}"/></td>
</tr>
</table>

<script>
    var newWin;
 function openWin(item)
 {
    newWin=window.open('', 'Help','height=200,width=800,left=200,top=100');
    newWin.document.write(item);
    newWin.focus();
 } 
 function closeWin() {newWin.close();}
 </script>