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: Is there a way to write a Menu to a DIV and not to the Document?
tobias.beuth
Junior Member

Posts: 3
Registered: 2/26/2004
Member Is Offline
posted on 2/26/2004 at 01:07 PM Reply With Quote
Is there a way to write a Menu to a DIV and not to the Document?


Literally, not using document.write but document.getElementById("mydiv").innerHTML?

Or another way to create a menu onclick?

Or are there any files that are not stripped to one line, so i can do it by myself?
View User's Profile View All Posts By User U2U Member
pkb
Junior Member

Posts: 4
Registered: 10/17/2006
Location: munich germany
Member Is Offline
posted on 10/17/2006 at 01:01 PM Reply With Quote
Is there a way to write a Menu to a DIV and not to the Document?


Like the question. It's exactly what I'am trying to do with tigra tree.

actually you can do

document.getElementById("mydiv").innerHTML = new tree(TREE_ITEMS, TREE_TPL);

The tree will even display in the div-element, but.... after that it hangs.

I got no clue, what this is all about, but I'd like to combine perl-Ajax with tigra tree.

But you didn't get an answer for more than two years. Probably there is no solution to that.
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 10/17/2006 at 01:13 PM Reply With Quote

new tree|menu (..) call returns the reference to the tree object, not its HTML so what you try doesn't work.
The tree uses document.write(..) method which writes the HTML directly into the document at the page initialization time. The tree/menu must be redesigned to allow initialization after the page is loaded. Submit a support ticket if you're interested in the customization.

For the "menu onclick" feature check out pop-up mode supported in Tigra Menu GOLD.
View User's Profile View All Posts By User U2U Member
pkb
Junior Member

Posts: 4
Registered: 10/17/2006
Location: munich germany
Member Is Offline
posted on 10/19/2006 at 06:17 AM Reply With Quote

so all it takes:

replace document.write(this.a_children.tmpQ()) in tree.js with
document.getElementById('mydiv').innerHTML=this.a_children.tmpQ();

This actually does work!

One could easily change

function tree(tmp0,tmp1,tmp2) to function tree(tmp0,tmp1,tmp2,tmp3)

and may then fill any div element

document.getElementById(tmp3).innerHTML=this.a_children.tmpQ();

by calling the tree

new tree (TREE_ITEMS, TREE_TPL, 'myTree', 'mydiv');

probably something like that could be added to upcoming versions.
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 10/19/2006 at 09:13 AM Reply With Quote

this gives you the HTML alright, but there may be problems down the road because for each call like this all the references must be checked to ensure everything corresponds to the HTML. Please make sure to post the updates if you detect the problem with your approach.
View User's Profile View All Posts By User U2U Member
pkb
Junior Member

Posts: 4
Registered: 10/17/2006
Location: munich germany
Member Is Offline
posted on 10/19/2006 at 01:37 PM Reply With Quote

Yes your objection seems to be reasonable. In my case I didn't encounter any problems
because the tree will be rebuild any time I call the perl-Ajax routine. Actually the tree is
rebuild entirely and this is what it was ment for. In a different <div> data in a database
is manipulated and after that the tree is called again in the server and the treediv
is written again. Probably this is wrong thinking, but the result is exactly what I expected.
The tigra tree is so fast, that rebuilding actually doesn't have any influence on the
timing of my application. Ajax is much slower. Anyway weird concepts, but very fashionable.
Probably the idea is working only in this environment. Thank you for your objection.
View User's Profile View All Posts By User U2U Member
mrcat
Newbie

Posts: 1
Registered: 10/25/2006
Location: New York
Member Is Offline
posted on 10/26/2006 at 12:05 AM Reply With Quote

Quote:
Originally posted by pkb
Like the question. It's exactly what I'am trying to do with tigra tree.
actually you can do
document.getElementById("mydiv").innerHTML = new tree(TREE_ITEMS, TREE_TPL);


I've done it for tigra menu. Just have to use DOM for creating items and little changes to calculate positions...
root level is become fixed, but other levels still have to have positions:absolute.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Functionality demos Functionality demos
Multiple
Cross-framed
Select-boxes
Effects
Design demos Design demos
Icons & arrows
Idea!
Hi there!
Matrix
MS Style
XP Style
Dots
3D-Buttons
Product Documentation Documentation
Documenation Page
Change Log
Menus Comparison Table
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