?
Solved

Collapsing List's in FrontPage 98

Posted on 1998-05-15
1
Medium Priority
?
289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
webgeek051598 earned 400 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

764 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