Javascript WZ_ToolTip
Post # 91 permalink Topic #91 by mreschke on 2008-07-23 11:31:07 (viewed 1,575 times)
Table of Contents

Find most documentation online at http://www.walterzorn.de/en/tooltip/tooltip_e.htm

Very awesome javascript tooltips, very advanced.

Slow page loads in IE[-][- -][++]

One thing I did find is in IE7 (and maybe others, didn't test), the page loads very slowly with wz_tooltip in there.

The fix was found at http://www.webdeveloper.com/forum/showthread.php?t=163644

I edited wz_tooltip

Code Snippet
        tt_Err("There are HTML elements to be converted to tooltips.\nIf you"
                + " want these HTML elements to be automatically hidden, you"
                + " must edit wz_tooltip.js, and set TagsToTip in the global"
                + " tooltip configuration to true.", false);

It defaultly says, true at the end.

I am using an html element with all my tooltip data, then calling the tip with TagToTip('tipContents')

Code Snippet
<div id='topContents' style='display:none;'>stuff in tooltop here</div>

Note: you must manually hide your div since we set the above tt_Err to false.

Then just after your wz_tooltip javascript include, add this

Code Snippet
<script>window.tt_HideSrcTags.done=true;</script>

So

Code Snippet
    </HEAD>
    <body onload="javascript:document.Form1.trackerNum.focus();" MS_POSITIONING="GridLayout">
    <script language="JavaScript" type="text/javascript" src="jscript/wz_tooltip.js"></script>
    <script>window.tt_HideSrcTags.done=true;</script>
        <FORM id="Form1" method="post" runat="server">
            <TABLE id="Table10" style="Z-INDEX: 101; LEFT: 0px; WIDTH: 984px; POSITION: absolute; TOP: 0px; HEIGHT: 915px"
                cellSpacing="1" cellPadding="1" width="984" border="0">
                <TR>

Works perfectly, tooltip load everything in the div, and page loads instantly