Solved

Collapsing List's in FrontPage 98

Posted on 1998-05-15
1
241 Views
Last Modified: 2013-12-25
Does this feature work in FrontPage98?? I have messed with it for a while
now and cant see how it possibly could from the javascript it inserts. I
built an <UL> with 3 <LI> 's then set the "enable collapsing list" checkbox
in the properties, then ran it, nothing but the sound of my mouse clicking
away...whats up with that?? Any help is always appreciated......

John
jcorbin@apci.net
0
Comment
Question by:jcorbin
1 Comment
 

Accepted Solution

by:
webgeek051598 earned 100 total points
ID: 1856336
Collapsing is for nested lists, as in the following (be sure you enable that option after you've created the nesting list, it didn't stick when I did that first testing this). In IE 4 view this, and click on Item 1, it will open and close the sub list with Item 1a.

<html>

<head>
<title>Home Page</title>
<script LANGUAGE="JavaScript" FPTYPE="dynamicoutline">
<!--
  // If you want to change this script, you must also make the following
  // changes so that FrontPage will not overwrite your new script.
  // In the script tag, change type="dynamicoutline" to type="mydynamicoutline"
  // In function dynOutlineEnabled, change "dynamicoutline" to "mydynamicoutline"
  // Throughout the HTML content, change dynamicoutline to mydynamicoutline
  // Change function dynOutline to function mydynOutline in the script
  // In the body tag, change onclick="dynOutline()" to onclick="mydynOutline()"
  function getControlTag(src)
  {
    TRok = false
    while ("HTML" != src.tagName)
    {
      if ("IMG" == src.tagName || "FONT" == src.tagName || "A" == src.tagName)
        TRok = true
      if ("LI" == src.tagName)
        return src
      if ("TR" == src.tagName)
      {
        if(TRok)
          return src
        return null
      }
      src = src.parentElement
    }
    return null
  }
  function dynOutlineEnabled(src)
  {
    while ("HTML" != src.tagName)
    {
      if("OL" == src.tagName || "UL" == src.tagName || "TABLE" == src.tagName)
        if(null != src.getAttribute("dynamicoutline", false))
          return true
      src = src.parentElement
    }
    return false
  }
  function containedIn(src, dest)
  {
    while ("HTML" != src.tagName)
    {
      if (src == dest)
        return true
      src = src.parentElement
    }
    return false
  }
  function dynOutline()
  {
    var ms = navigator.appVersion.indexOf("MSIE");
    ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4);
    if(!ie4)
        return;
    var src = event.srcElement
    src = getControlTag(src)
    if (null == src)
      return
    if (!dynOutlineEnabled(src))
      return
    var idx = src.sourceIndex+1
    while (idx < document.all.length && containedIn(document.all[idx].parentElement, src))
    {
      srcTmp = document.all[idx]
      tag = srcTmp.tagName
      if ("UL" == tag || "OL" == tag || "TABLE" == tag)
        srcTmp.style.display = srcTmp.style.display == "none" ? "" : "none"
      idx++;
    }
  }
//-->
</script></head>

<body onclick="dynOutline()">

<ul dynamicoutline>
  <li>Item 1 <ul>
      <li>Item 1 a</li>
    </ul>
  </li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>
</body>
</html>

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now