DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

suggestions, treeview?

This is a discussion on suggestions, treeview? within the ASP Development forums, part of the Programming & Scripting category; Hi All, I currently have a page that looks like below....the ItemName is a link and opens to a new ...

Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

  #1  
Old March 30th, 2009, 03:25 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Question suggestions, treeview?

Hi All,

I currently have a page that looks like below....the ItemName is a link and opens to a new window that contains all the piece parts for that item. My question is I googled treeview because I wanted to know if there is another way to do this...something like second example below where i can expand the itemname? Would this be a way to use treeview or some other way?

Code:
Ex1:
ProductLineName--
--CategoryName
----ItemName
ProductLineName--
--CategoryName
----ItemName
etc...
Code:
Ex2:
ProductLineName--
--CategoryName
    +ItemName
         ----Part1
         ----Part2
         ----Part3
ProductLineName--
--CategoryName
    +ItemName
         ----Part1
         ----Part2
         ----Part3
etc...
Reply With Quote
  #2  
Old March 30th, 2009, 08:50 PM
dr_rock's Avatar
Drunk Barn Owl
 
Join Date: Jun 2008
Location: Melbourne, Australia
Posts: 92
Rep Power: 2
dr_rock will become famous soon enough
Default

The best way to do that is with javascript, heres an applet you could use: TreeView: JavaScript DHTML Tree Menu

Here is a simple tree menu source code: Dynamic Drive DHTML Scripts- Simple Tree Menu


Comments on this post
jmurrayhead agrees: yeap...
__________________
Eval("2b" || !"2b") - shakespeare
Reply With Quote
  #3  
Old March 31st, 2009, 03:02 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

hi...need some help here..

shouldn't this work?
or should the <td> tags be on the outside?
its showing a bullet with nothing
then bullet with the itemdesc name...but no expand/contract.

Code:
<ul id="treemenu1" class="treeview">
<li><td align=right><%=rs("ItemID")%></td>
	<ul>
	<li><%=rs("ItemDesc")%></li>
	</ul>
</li>
</ul>
Reply With Quote
  #4  
Old March 31st, 2009, 05:00 PM
mehere's Avatar
Super Sarcasm Mistress
 
Join Date: Mar 2008
Real name: Joanne
Location: Wide Awake In Dreamland
Posts: 375
Rep Power: 6
mehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nice
Default

the td tag is for a table cell ... if you want the tree inside the cell, then yes, the td tag should be before and after the UL tags
__________________
Quote of the Month:
Mistakes: It could be that the purpose of your life is only to serve as a warning to others.

Questions to Ponder:
Why do banks charge you a "non-sufficient funds fee" on money they already know you don't have?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright © 2008 sbenj69

Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.
Reply With Quote
  #5  
Old March 31st, 2009, 08:09 PM
dr_rock's Avatar
Drunk Barn Owl
 
Join Date: Jun 2008
Location: Melbourne, Australia
Posts: 92
Rep Power: 2
dr_rock will become famous soon enough
Default

Here is some info on using HTML lists: HTML Lists
Reply With Quote
  #6  
Old July 9th, 2009, 09:08 AM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

for some reason i couldn't get it to work for me....but i think expand/collapse is what i need, i found this example....

JAVASCRIPT EXAMPLES: Collapse and Expand Page Sections

i'm gonna give it a shot unless someone has a better example?

how does this really differ from the tree?
Reply With Quote
  #7  
Old July 9th, 2009, 09:49 AM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

well, it may be closer to this example because my stuff is in a table.

Expand and Collapse table rows / tree structures with Javascript Lavanya’s Blog
Reply With Quote
  #8  
Old July 9th, 2009, 10:19 AM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

grr...ok, having trouble, i'm trying to use the example giving at the end of this post:

How to expand and collapse multiple rows in table using Java script (HTML and JavaScript forum at JavaRanch)

but i'm not getting any results....want me to post new javascript thread?

should this have the word "this" or "obj"?

Code:
onClicked=""showHide(this)""
Addition:
I'm using this with a recordset on my asp page that has a couple of loops, could this be the issue?

I'm not getting any errors but I'm not getting a hand to click.

Last edited by Rebelle; July 9th, 2009 at 10:25 AM. Reason: addition
Reply With Quote
  #9  
Old July 9th, 2009, 02:17 PM
BLaaaaaaaaaarche's Avatar
Barn Frequenter
 
Join Date: Mar 2008
Posts: 157
Rep Power: 3
BLaaaaaaaaaarche will become famous soon enoughBLaaaaaaaaaarche will become famous soon enough
Default

Post all of your code. I can help you with your tree structure. Post in a zip file if multiple files.
__________________
"You'll never be as perfect as BLaaaaaaaaarche."
Reply With Quote
  #10  
Old July 9th, 2009, 02:59 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

Thanks BLaaaaaaaaarche, do you want the whole asp page? or just code starting at <form> tag?

also, can i email it to you?
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > ASP Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Suggestions please (website review) sbenj69 Website Reviews 21 January 26th, 2009 03:57 PM
Menu Buttons Tips/Suggestions Rebelle HTML & CSS Help 3 December 23rd, 2008 08:26 AM
Suggestions - ChangedOn field Rebelle ASP Development 7 April 8th, 2008 02:07 PM
[Feedback] User Title Suggestions jmurrayhead Suggestions & Feedback 15 March 21st, 2008 12:54 PM


All times are GMT -4. The time now is 10:24 PM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2