Source Code for user.html.macros.mouseOver

on mouseOver (glossSpec, msgText) {
     «mouseOver © 1997 by Philip Suh.
          «Terms of Use:
               «Permission granted to use and redistribute this script
               «only if this documentation and copyright statement are
               «included and unmodified.  Use of this script is governed
               «by the full copyright statement, available from the Script Archive.
          «From the filsa.net Frontier Script Archive:
               «Full documentation, updates, and other scripts are available from
               «http://www.filsa.net/frontier/scripts/
          «Docs -- version 1 Tue, Aug 26, 1997 at 3:57:59 AM by PS
               «glossSpec can be
                    « a regular Frontier glossary reference or 
                    «<a> tag of this form:
                         «<a href="page.html"> or
                         «<a href="page.html">My Page</a>
               «if glossSpec does not yet exist in a glossary:
                    «the script returns the glossSpec in quotes.
               «msgText is the text that will show up in 
               «the status bar when a Javascript capable browser
               «activates the mouseOver event on this link.
     
     local {
          glossString;
          textToInsert;
          ix}; «index
     
     case true { «analyze glossSpec
          string.lower(glossSpec) beginsWith "<a ";
          glossSpec beginsWith "[[#glossPatch" {
               «we don't process glossSpecs that already are <a> tags
               «or glossary patch references
               glossString = glossSpec}}
     else {
          «it's a regular glossary reference, so convert to <a> tag
          try {
               glossString = html.refGlossary (glossSpec)}
          else { «if glossSpec doesn't exist, return it in quotes
               return ("\"" + glossSpec + "\"")}};
     
     if glossString beginsWith "[[#glossPatch " { «relative glossary
          «turn relative glossaries into regular <a href> tags
          glossString = user.html.macros.glossPatcher (glossString)};
     
     textToInsert = " onMouseOver=\"window.status='" + msgText + "';return true\"";
     textToInsert = textToInsert + " onMouseOut=\"window.status='';return true\"";
     ix = string.patternmatch (">", glossString);
     if ix == 0 { « error, couldn't find closing '>' of the <a href> tag
          local (errMsg);
          errMsg = "mouseOver() - couldn't convert glossSpec to a valid tag.";
          scripterror (errMsg)};
     glossString = string.insert (textToInsert, glossString, ix);
     
     return (glossString)}

Go back to the main page for this script