The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Expandable List, Making an expandable list
htmlammie
post Oct 25 2008, 11:34 AM
Post #1


Newbie
*

Group: Members
Posts: 17
Joined: 22-October 08
Member No.: 6,962



I need some help making an expandable list. i have this code worked out so far for a one level expandable list, but i want it to be multiple levels like:
1
>>1
>>>1
>>>2
>>2
>>>1
>>>2
2
>>1
>>>1
>>>2
>>2
>>>1
>>>2

^^^sry if u dont get that, but its the only way i could think of explaining it...


the script is:
<script type="text/javascript">
function toggleBox(id){
if (document.getElementById(id).style.display == "") {
show = "none";}
else {show = "";}
document.getElementById(id).style.display = show;}
</script>


and the body is:

<BODY>
<table width="100%" align="center">
<tr>
<td>
<a href="java script:toggleBox(1)">+</a>&nbsp;<a href="" >7th Grade</a>
</td>
</tr>
</table>



<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="1" style="display: none;">
<tr>
<td bgcolor="#FFFFFF" width="10%">
&nbsp;
</td>
<td bgcolor="#FFFFFF" width="*">
<font color="#000000" face=Arial>
-&nbsp;<a href="">Microsoft Office</a><br />
-&nbsp;<a href="">Programming</a><br />
-&nbsp;<a href="">Other Work</a><br />

</font>
</td>
</tr>
</table>
</BODY>

now tell me if im wrong but. dont i need a form and like assign id's and everything. in my class i was only taught the basics, and im kinda reaching out to new stuff that i havnt been taught. so thats why im pre clueless about this more advanced stuff... and thts also y i need a detailed explanation and examples and stuff. sry if its asking too much.

i also have no idea what <tr> <td> <table> is... i just found the stuff. and hav no idea what they do or how to use them.


k thx.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tharpdevenport
post Nov 2 2008, 03:43 AM
Post #2


Advanced Member
****

Group: Members
Posts: 201
Joined: 25-October 06
Member No.: 571



It's a Tree. I can give you a link to a page where I used it and you can just fill in your own stuff.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 07:34 AM