Tip

Show Onlinehelp In A Nice Way

A nice way to show help on Webpages is to move the mouse over static text an
just to popup a window before the mouse leaves it's position again.
1. Copy these to JavaScript functions into your Notes Form:

<SCRIPT LANGUAGE="JavaScript">
function MEH_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length)
{
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MEH_findObj(n,d.layers[i].document); return x;
}

function MEH_showHideLayers() { //v3.0
var i,p,v,obj,args=MEH_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MEH_findObj(args[i]))!=null) {
v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
</SCRIPT>
--------------------------------------------
2. Copy the next Layers into your Notes Form:
The Layers define the Onlinehelp you want to show on mouseover (be free to copy
as many Layers as you need):

<div id="Layer1" style="position:absolute; width:150px; height:200px;
z-index:1; left: 680px; top: 23px; visibility: hidden">
<table width="210" border="1" cellspacing="0" cellpadding="5" bgcolor="#FFCC99">
<tr>
<td><font face="Arial, Helvetica, sans-serif" size="2">This shows help to the
static text FIRSTNAME !</font></td>
</tr>
</table>
</div>

<div id="Layer2" style="position:absolute; width:150px; height:200px;
z-index:1; left: 680px; top: 23px; visibility: hidden">
<table width="210" border="1" cellspacing="0" cellpadding="5" bgcolor="#FFCC99">
<tr>
<td><font face="Arial, Helvetica, sans-serif" size="2">This shows help to the
static text LASTNAME !</font></td>
</tr>
</table>
</div>

Instead of writing the online-help hardcoded, i recommend you to insert a
Formel-Hotspot and to do a simple dblookup on your Online-Help-DB.
---------------------------------------------
3. To use the Help paste the next example into your Notes Form:

<TABLE>
<TR>
<TD WIDTH='120' BGCOLOR='#FFBF18'><FONT FACE='Arial' SIZE='2' a href="#"
onMouseOver="MEH_showHideLayers('Layer1','','show')"
onMouseOut="MEH_showHideLayers('Layer1','','hide')"</a>FIRSTNAME</FONT></TD>
<TD WIDTH='160'><FONT FACE='Arial' SIZE='2'>FieldName</FONT></TD>
<TD WIDTH='120' BGCOLOR='#FFBF18'><FONT FACE='Arial' SIZE='2' a href="#"
onMouseOver="MEH_showHideLayers('Layer2','','show')"
onMouseOut="MEH_showHideLayers('Layer2','','hide')"</a>LASTNAME</FONT></TD>
<TD WIDTH='100'><FONT FACE='Arial' SIZE='2'>FieldLastName</FONT></TD>
</TR>
</TABLE>

Focus on:
a href="#" onMouseOver="MEH_showHideLayers('Layer1','','show')"
onMouseOut="MEH_showHideLayers('Layer1','','hide')"</a>
------------------------------------------
4. Don't forget to mark text and define passtrough html

This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.