Clicking on Node

Discuss everything related to ApPHP TreeMenu. Any questions related to the ApPHP TreeMenu developing or using should be posted to this forum.

Moderators: alexandrleonenko, Milton

rfresh
Newbie
Newbie
Posts: 8
Joined: Jul 6th, '10, 16:30

Clicking on Node

Postby rfresh » Jul 9th, '10, 06:07

I'm not clear what attribute(s) are fired when I click on a tree node?

I have an anchor tag in my node text and I want to click on the node and see the text from a mysql record display in the right side column. I want to select the record based on its Rec_id value, so that's what I'm putting into my anchor tag in the node text. Is this the right way to do this? I see your code is setup to click on a node and display text from a file but I want to display out of a mysql record. I'm a little confused at this point because I can't follow how the text file is opened to display on the right side even tho I want to use a mysql record.

I think I have to put the record text inside the function Display() of the treemenu.class.php script.

Milton
Senior
Senior
Posts: 31
Joined: Jan 14th, '10, 14:17

Re: Clicking on Node

Postby Milton » Jul 12th, '10, 17:17

May be you could do it via a PHP file that takes Rec_id as a parameter, connects to mysql and returns text from a mysql record. Then the nodes should be added like this:
$treeMenu->AddNode("node1","record_extractor.php?Rec_id=1");
$treeMenu->AddNode("node2","record_extractor.php?Rec_id=2"); etc.
Hope that helps.

Louise55
Newbie
Newbie
Posts: 1
Joined: Jan 25th, '14, 09:52

Re: Clicking on Node

Postby Louise55 » Jan 25th, '14, 09:55

Nice post to hang on. I really loved it the way of the stuff provided in this article. This has given very useful information.


Return to “ApPHP TreeMenu”