GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Aug-2003, 08:27
zuzupus zuzupus is offline
Junior Member
 
Join Date: Jul 2003
Posts: 70
zuzupus is an unknown quantity at this point

tree problem


Hi,

is anybody there who can help me in tree structure,actually what is happening whenever i click on som child tree or parent node its jumping up i mean for seeing thetree whom i clicked i have to scroll down everytime how to stop this i no there is client side javascript to hold this

for eg.

-Tree (Parent)
-Tree1(child for Tree)
-Tree2(child for Tree and Tree1)
x
y(these 3 elements r child for Tree2)
z

but when i click something on y then i cant see the y in frame i have to scroll down to see the y,i mean to say its not stable like the example shown in javascript.internet.com

and moreover i try to use this one <a name="anchNode">
its still not working

PHP Code:

<?
    function showTree($id, $level) {
                        global $tree, $session, $active;
                        $var = is_array($tree[$id]) ? $tree[$id] : array();
                        foreach($var as $pk => $name) {
                        if ($name[0] == chr(1)) { $new = true; $name = substr($name, 1); } else $new = false;
                        if ($name[0] == '+' || $name[0] == '-')
                                                       $link = 'href="'.htmlentities("pane.phtml?flip=$pk&close=".($session->open[$pk] ? 1 : 0)).'#anchNode"';
                        else
                                                       $link = 'href="'.htmlentities("pane.phtml?active=$pk").'#anchNode"';
                        ?>
                                                       <p class="h<?=(($level > 4) ? 7 : ($level+3)) ?>"><?=str_repeat('&nbsp;', $level*3) ?>

<a name="anchNode"></a><a class="h<?=(($level > 4) ? 7 : ($level+3)) ?>" <?=$link ?>>
<?=(($active == $pk || $new) ? '<span class="'.($active == $pk ? 'white' : 'newfiles').'">' : '') ?>
<?=htmlentities($name) ?><?=(($active == $pk || $new) ? '</span>' : '') ?></a></p>
                        <?
                        if ($session->open[$pk])
                        showTree($pk, $level+1);
                        }
                        }
                        showTree(0, 0);
    
?>


thanks in advance
Attached Images
File Type: jpg tree.jpg (72.7 KB, 5 views)
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with php5 cgi installation fab13 Apache Web Server Forum 3 19-Nov-2003 09:11
unwanted scrollbar problem kelly001 Web Design Forum 3 24-Oct-2003 10:44
problem with creating class mohammed CPP / C++ Forum 1 11-Oct-2003 09:04
textarea width problem zuzupus Web Design Forum 2 23-Jul-2003 03:06
client side problem zuzupus MySQL / PHP Forum 2 22-Jul-2003 06:47

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:08.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.