?
Solved

tree structure like explorer

Posted on 2003-03-17
3
Medium Priority
?
236 Views
Last Modified: 2011-09-20
Hi all,

I have a list of values that are to be displayed in a tree structure. I am using front page for developing the web page.
For the time being the purpose is served with bullet points. I have to replace the bullet points with + to collapse and - for expand. Thats something similar to what we see in the windows explorer left side frame.

I am using HTML, Java script.

Please give me suggestions
Thanks in advance

UKris
0
Comment
Question by:UKris
[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
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
vosk earned 150 total points
ID: 8158871
I think that a way is using some empty tags, so then (when the user press +) you can fill with the information.
Here is a simple example of what I mean:
<html>
<head>
<script language="JavaScript">
var state1 = 0, state2 = 0;
function A()
{
if (state1 == 0)
     {document.all.image1.src = "imageless.gif";
      document.all.cd.insertAdjacentHTML("BeforeEnd", "First C: folder<br>Second  C: folder<br>Third  C: folder");
      state1 = 1
     }
else
     {document.all.image1.src = "imagemore.gif";
      document.all.cd.innerText = "";
      state1 = 0
     };

}
function B()
{
if (state2 == 0)
     {document.all.image2.src = "imageless.gif";
      document.all.ad.insertAdjacentHTML("BeforeEnd", "First A: folder<br>Second  A: folder<br>Third  A: folder");
      state2 = 1
     }
else
     {document.all.image2.src = "imagemore.gif";
      document.all.ad.innerText = "";
      state2 = 0
     };

}
</script>
</head>
<body>
<img id="image1" src="imagemore.gif" onClick="A();">C:\<br>
<div id="cd"></div>
<br>
<img id="image2" src="imagemore.gif" onClick="B();">A:\<br>
<div id="ad"></div>
</body>
</html>
I have only set 2 variables outside of the functions, so I can modify them from the function but won't change every time that I run the script.
Use the + and - images as imagemore.gif and imageless.gif (or what name that you want, but remeber to change it also on the image tags).
jbosch(vosk)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9305729
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 3

Expert Comment

by:vosk
ID: 9308665
Thank you for the points, and glad to help.
jbosch(vosk)
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
Suggested Courses

752 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