Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Create tree items dynamically?
jsl
Junior Member

Posts: 2
Registered: 5/8/2006
Member Is Offline
posted on 5/8/2006 at 09:08 AM Reply With Quote
Create tree items dynamically?


Sorry if this has already been answered but I can't seem to find a solution that works for me.

All I want to do is create the tree dynamically from the server side code of a Java Web application rather than use a static .js file. I have tried creating a text string within servlet code and placing that text into a hidden form field on a JSP. Then I reference that form field value rather than the global TREE_ITEMS variable. I have checked the form field value to make sure that it is correct but it doesn't seem to work. I don't get any Javascript error but nothing is generated either.

Here is what I am trying to do:

<script language="JavaScript">
<!--//
var data = document.getElementById("menuData").value;
new tree (data, TREE_TPL);
//-->
</script>

where "menuData" is a hidden form field containing the tree structure.

Is it not possible to use the free menu this way? Do I need to upgrade to get this functionality? Or am I just on the wrong track entirely? Thanks for your help!
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 5/8/2006 at 02:49 PM Reply With Quote

intead of using the form field print the text of the items structure in the same <script ..> block by your server side script. view the result using view->source feature of your browser. I.e

<script language="JavaScript">
<!--//
var data = <? ... place your server side code generating items structure here ... ?>

new tree (data, TREE_TPL);
//-->
</script>
View User's Profile View All Posts By User U2U Member
jsl
Junior Member

Posts: 2
Registered: 5/8/2006
Member Is Offline
posted on 5/9/2006 at 05:39 AM Reply With Quote

That worked great! Instead of the form field I wrote a Java custom tag to generate the tree items. (I should have thought of that to begin with). Thank you very much for the quick response!
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 5/19/2006 at 04:35 PM Reply With Quote

Complete manual for this: http://www.softcomplex.com/forum/viewthread_3551/
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Tree Menu
Product Demonstrations Live Demos:
Frames targeting
Win help style
Free Download Free Download
Free Download Menu Builders
Online Builder
Product Documentation Documentation:
Documenation Page
Support Forum Technical Support
Support Forum
   
Tigra Tree Menu PRO
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004