Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 2nd, 2005, 03:32 AM
okl okl is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Singapore
Posts: 363 okl User rank is Private First Class (20 - 50 Reputation Level)okl User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 h 28 m 49 sec
Reputation Power: 6
modify tree view example

trying to get the performance.asp display out on same page but doesnt seem to work..

http://172.16.150.106/eass/EG1009/index.asp

http://172.16.150.106/eass/common/paper/2004s1/performance.asp


example: the picture boston is displayed on the same page. http://www.treeview.net/treeviewfiles/demoFrameless.html?pic=%22beenthere_boston%2Ejpg%2 2

look at the red color codes.

treeview.js
Code:
 // You can find instructions for this file at http://www.treeview.net
  
  //Environment variables are usually set at the top of this file.
  USETEXTLINKS = 1
  STARTALLOPEN = 0
  USEFRAMES = 0
  USEICONS = 0
  WRAPTEXT = 1
  PRESERVESTATE = 1
  
  
  function open_2004S1()
  {
  w=screen.width
  h=screen.height
 window.open("/eass/common/paper/2004s1/start_check.asp", "my_new_window", "toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width="+w+", height="+h+"")
  }
  
  
  
  foldersTree = gFld("<b>Home</b>", "index.asp")
  
  //DC circuit tree node   
  aux1 = insFld(foldersTree, gFld("DC Circuit", "javascript:undefined"))
  	aux2 = insFld(aux1, gFld("DC Basic", "javascript:undefined"))
  		insDoc(aux2, gLnk("S", "Voltage Divider", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Current Divider", "vd.asp"))
  		insDoc(aux2, gLnk("S", "KVL", "vd.asp"))
  		insDoc(aux2, gLnk("S", "KCL", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Total Series Resistance", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Total Parallel Resistance", "vd.asp"))
  		
  	aux2 = insFld(aux1, gFld("DC Intermediate", "javascript:undefined"))
  		insDoc(aux2, gLnk("S", "Voltage Divider", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Current Divider", "vd.asp"))
  		insDoc(aux2, gLnk("S", "KVL", "vd.asp"))
  		insDoc(aux2, gLnk("S", "KCL", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Equivalent Resistance", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Sources", "vd.asp"))
  
  	aux2 = insFld(aux1, gFld("DC Advance", "javascript:undefined"))
  		insDoc(aux2, gLnk("S", "Mesh Analysis", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Nodal Analysis", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Superposition", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Thevenin Theorem", "vd.asp"))
  		
  
 //	insDoc(aux1, gLnk("B", "Opens in new window", "http://www.treeview.net/treemenu/demopics/beenthere_pisa.jpg"))
   
   //AC circuit tree node   
  aux1 = insFld(foldersTree, gFld("AC Circuit", "javascript:undefined"))
  	aux2 = insFld(aux1, gFld("AC Basic", "javascript:undefined"))
  		insDoc(aux2, gLnk("S", "Complex Number", "vd.asp"))
  		insDoc(aux2, gLnk("S", "Conversion", "vd.asp"))
  				
  	aux2 = insFld(aux1, gFld("AC Intermediate", "javascript:undefined"))
  		insDoc(aux2, gLnk("S", "Phasor Application", "vd.asp"))
  		
  
  	aux2 = insFld(aux1, gFld("AC Advance", "javascript:undefined"))
  		insDoc(aux2, gLnk("S", "Resonance", "vd.asp"))
  		
   
  //Common Test tree node  
  aux1 = insFld(foldersTree, gFld("Common Test Paper", "javascript:undefined"))
  	aux2 = insFld(aux1, gFld("2004 Semester 1", "javascript: open_2004S1()"))
      insDoc(aux2, gLnk("S", "Performance", "index.asp?pic=%22../common/paper/2004s1/performance%e2asp%22"))
  	aux2 = insFld(aux1, gFld("2005 Semester 1", "javascript:undefined"))
    
    
    
  //Exam Paper tree node 
  aux1 = insFld(foldersTree, gFld("Exam Paper", "javascript:undefined"))
  	aux2 = insFld(aux1, gFld("2004 Semester 1", "javascript: open_win()"))
  	aux2 = insFld(aux1, gFld("2005 Semester 1", "put link here."))
   
  
  	  
     


index.asp
Code:
     
     
     	  
     		   <!--
  	 (Please keep all copyright notices.)
  	 This frameset document includes the Treeview script.
  	 Script found at: http://www.treeview.net
  	 Author: Marcelino Alves Martins
  
  	 Instructions:
  	 - Follow the steps labeled SECTION1, SECTION2, etc. in this file
  -->
  
  
  <html>
  
  <head>
  
  <title>SEG EG1009 E-Assessor</title>
  
  <!-- SECTION 1 -->
  <style>
     /* styles for the tree */
     SPAN.TreeviewSpanArea A {
  		font-size: 10pt;
  		font-family: verdana,helvetica;
  		text-decoration: none;
  		color: black
     }
     SPAN.TreeviewSpanArea A:hover {
  		color: '#820082';
     }
     /* rest of the document */
     BODY {background-color: white}
     TD {
  		font-size: 10pt;
  		font-family: verdana,helvetica;
     }
  </style>
  
  
  
  <!-- SECTION 2: Replace everything (HTML, JavaScript, etc.) from here until the beginning
  of SECTION 3 with the pieces of the head section that are needed for your site  -->
  
  		<script>
  		//This script is not related with the tree itself, just used for my example
  		function getQueryString(index)
  		{
  			var paramExpressions;
  			var param
  			var val
 			paramExpressions = window.location.search.substr(1).split("&");
  			if (index < paramExpressions.length)
  			{
 				param = paramExpressions[index];
  				if (param.length > 0) {
 					return eval(unescape(param));
  				}
  			}
  			return ""
  		}
  		</script>
  
  <!-- SECTION 3: These four scripts define the tree, do not remove-->
  <script src="../javascript/treeview/ua.js"></script>
  <script src="../javascript/treeview/ftiens4.js"></script>
  <script src="treeview.js"></script>
  </head>
  
  
  <!-- SECTION 4: Change the body tag to fit your site -->
 <body bgcolor=white leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" onResize="if (navigator.family == 'nn4') window.location.reload()">
  
  
 <!-- SECTION 5: Replace all the HTML from here until the beginning of SECTION 6 with the pieces of the head section that are needed for your site -->
  
  
  <MAP NAME="ButtonsMap">
 <area shape="rect" alt="Home" 	coords="220,11,277,31" 		 href="index.asp" target="_top">
    <AREA SHAPE="rect" ALT="My Performance" COORDS="488,8,637,33" HREF="seg_performance.asp" target=_top>
    <AREA SHAPE="rect" ALT="Logout"	COORDS="647,9,738,32" HREF="../logout.asp" target=_top>
  </MAP>
  
  		<table cellpadding=0 cellspacing=0 border=0 width=772><tr>
  	<td width=772> <img src=../images/buttonsmap.gif  USEMAP="#ButtonsMap" border=0></td>
    </tr></table>
  
  
  		<table cellpadding=0 cellspacing=0 border=0 width=772>
  		<tr>
  			<td width=178 valign=top>
 			<table cellpadding=4 cellspacing=0 border=0 width=100%><tr><td bgcolor=#ECECD9>
 		 	<img src=http://www.treeview.net/treemenu/layout/t.gif width=170 height=1><br>
 		 	<table cellspacing=0 cellpadding=2 border=0 width=100%><tr><td bgcolor=white>
  
  <!-- SECTION 6: Build the tree. -->
  
  <!-- By making any changes to this code you are violating your user agreement.
  	 Corporate users or any others that want to remove the link should check
  	 the online FAQ for instructions on how to obtain a version without the link -->
  <!-- Removing this link will make the script stop from working -->
 <table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></font></td></tr></table>
  
  <span class=TreeviewSpanArea>
  <script>initializeDocument()</script>
  <noscript>
  A tree for site navigation will open here if you enable JavaScript in your browser.
  </noscript>
  </span>
  
  
  <!-- SECTION 7: Continuation of the body of the page, after the tree. Replace whole section with
  your site's HTML. -->
  
  		</td></tr></table></table>
  		</td>
  		<td bgcolor=white valign=top>
 		<table cellpadding=10 cellspacing=0 border=0 width=100%><tr><td>
  
  
  
  		<h4>SEG EG1009 E-Assessor Home Page</h4>
  
  		<%
  		Response.Write "Hi, " & "<b>"
  		Response.write Session("StudName")
  		Response.Write "</b>" & " "
  		Response.Write Session("StudID")
  
  		%>
  		<script>
  		 var picURL
  			picURL = getQueryString(0)
  			if (picURL.length > 0)
 			 document.write("<a href src=http://172.16.150.106/eass/" + picURL + "><br><br>");
  		</script>
  
  
  		</td></tr></table></td></tr></table>
  
  </body>
  </html>
  
     
     
     

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > modify tree view example


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek