Solved

Collapsing List's in FrontPage 98

Posted on 1998-05-15
1
262 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

830 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