Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Collapsing List's in FrontPage 98

Posted on 1998-05-15
1
Medium Priority
?
299 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

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?
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Suggested Courses

604 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