Tigra Tree Menu PRO Softcomplex logo
About Us  | Services  | Download  | Order  | Support  |
Server Side Component for Tigra Tree Menu PRO - ASP VBasic, MS Access
Description
This ASP component dynamically generates Tigra Tree Menu PRO hierarchy from MS Access database. No programming skills required to configure and use this code.
Advantages

No client side navigation maintenance - Once installed this component will always keep your navigation structure up-to-date reading information right from the source.

Database Type independent - This component with minimal changes can be tuned for any SQL database or ODBC source such as MSQSL server, Oracle or any other.

Reusable code saves your time - Save hours of coding with this effective and robust script. Don't reinvent the bicycle, find better use for your time.

Easy setup - Minimum IT experience is required to setup this ASP component while following clear step-by-step instructions provided.

Links
Other Server Side Components
 
Tigra Tree Menu PRO License
To take advantages of Server Side Component for Tigra Tree Menu PRO you need to have Tigra Tree Menu PRO license and legally obtained client-side code of this navigation system.
System Requirements
Check if your web hosting meets following requirements:
  1. MS Windows Hosting with SSI, ASP and Database support. If your site is hosted on linux server then see PHP version of the server side component provided in this package
  2. You have enough access rights to upload ASP files
Quick Start
In this package we've provided pre configured component so you can see it in action instantly. Copy all files and directories from current folder (asp_vb_database) to your web server. If your hosting meets system requirements you should see demo page with tree dynamically generated from sample database when you open demo.asp file from the server via HTTP.
Customizing the Script for Your Application
1. Configure Tigra Tree Menu PRO
This server side component dynamically generates hierarchy of the tree, other aspects such as styles and icons are static. Set up your Tigra Tree Menu PRO with static hierarchy and then migrate to dynamic source. Should you have any product related questions you can always refer to documentation and forum.
2. Link Server Side Component to Your Page
Code that dynamically builds structure of your navigation resides in file tree/items.asp provided in this package. To use this code you should link it to your ASP page with SSI (server side includes). You don't need much to know to use it, just insert code below in your ASP page:
<!-- #INCLUDE FILE="tree/items.asp" -->
Now you can call tree generating function anywhere below this line. Alternatively you can copy all code from tree/items.asp file to your ASP page. Note that you're not allowed to remove product information block that resides at the beginning of the file regardless the way you use the code.
3. Adjust Component for Your Database
Server Side Component for Tigra Tree Menu PRO is able work with any ADO database, not only with MS Access. You can adjust the script for database that your particular application uses: just call generator functions providing existing database connection (see advanced notes below in this document). It is also possible to apply additional filters modifying SQL query in build_hierarchy function. With basic component configuration you don't need to worry about these adjustments, you can build your database based on sample MS Access database provided.
4. Setup Tree Generator Function
Tree Generator Function build_hierarchy_var(...) generates client-side JavaScript code of items structure. It should be inserted within client side JavaScript block instead of linked static tree_items.js file:
<head>
<!-- some header data -->
<link rel="stylesheet" href="tree/tree.css">
<script language="JavaScript" src="tree/tree.js"></script>
<script language="JavaScript" src="tree/tree_tpl.js"></script>
<script language="JavaScript">
<% Call build_hierarchy_var("TREE_ITEMS","tree/data","table","id","ppid","caption","link") %>
</script>
</head>
function receives 7 parameters:

build_hierarchy_var(vn, dbl, tn, idfn, pidfn, cfn, lfn)

where

Variable name Description Accepted values
vn Name of JavaScript variable which will contain tree hierarchy structure. Should be the same as Tigra Tree Menu PRO constructor receives (see below) String
dbl Path to Microsoft Access DB file String
tn Name of the table which will be used as a tree hierarchy source String
idfn Field name containing unique ID for each item String
pidfn Field name containing parent ID for each item String
cfn Field name containing caption for each item String
lfn Field name containing link for each item String
5. Check Tree Constructor
Check Tigra Tree Menu PRO constructor which should be positioned relatively in your HTML code. If in previous step you specified same tree items structure name as you used for static navigation then no changes are required here.
<script language="JavaScript">
<!-- //
	new tree (TREE_ITEMS, TREE_TPL);
// -->
</script>
6. Upload Files to Server
Now upload new and updated files to your server. Make sure .asp files are in directories where scripts are allowed to run.
7. Test Script Setup
If your web server is running and all above steps was passed with no errors then you should see Tigra Tree Menu PRO dynamically generated from your database when accessing your HTML document via HTTP.
Should you experience any problems try modifying pre configured demo step-by-step checking if code still work after each minor modification so you can detect where the error is.
Advanced Notes:
Call of the function: function build_hierarchy_var can be placed inside of the add-on script items.asp. To generate tree hierarchy structure it is enough to attach its output to HTML document:
<script language="JavaScript" src="tree/items.asp"></script>
Existing connection: items.asp add-on contains two functions build_hierarchy_var and build_hierarchy. First function prepairs connection with the database and passes it to the second. So if you've got an already established connection you can use build_hierarchy directly.
Note: build_hierarchy function requires eight arguments to be supplied
build_hierarchy(conn, id, vn, tn, idfn, pidfn, cfn, lfn)

Below is the list of its arguments with descriptions

Variable name Description Accepted values
conn ADODB.Connection object ADODB.Connection object
id Initial parent ID value Number
vn Name of JavaScript variable which will contain tree hierarchy structure String
tn Name of the table which will be used as a tree hierarchy source String
idfn Field name containing unique ID for each item String
pidfn Field name containing parent ID for each item String
cfn Field name containing caption for each item String
lfn Field name containing link for each item String
Terms and Conditions
License
Server Side Component for Tigra Tree Menu PRO is provided to Tigra Tree Menu PRO license owners as supplemental code at no additional charge.
Usage
As owner of the Tigra Tree Menu PRO license You are allowed to configure the server side component in any possible way for use in Internet (public), Intranet (corporate) or offline application, however You are strictly NOT allowed (unless specifically authorized by SoftComplex.com) to:
  • Use or redistribute Server Side Component without Tigra Tree Menu PRO
  • Claim authorship of the code
Technical Support
Technical Support for this product is provided via Tigra Tree Menu PRO Forum
Violations of Terms and Conditions
Should you violate these Terms and Conditions or any other rights of SoftComplex Inc., SoftComplex Inc. reserves the right to pursue any and all legal and equitable remedies against you without limitation.
Copyright ©2002-2005 SoftComplex Inc. All rights reserved. | company info | terms of service | privacy policy |