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&∥ent.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
This Content Component encountered an error

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close