Jump to content

VAB

New Members
  • Posts

    2
  • Joined

  • Last visited

VAB's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. when i Click on node of the tree , the new page don't open. each node is linked with <a> tag as u may have noticed in the code as well.
  2. I wrote the following code in php but when i click on the node, the link ;doesn't work <?php function get_menu_tree($parent_id) { global $conn; $menu = ""; //$sqlquery = " SELECT linkpage,moduleid,menuid,menuname,parentid,menudisplay FROM admnmenumaster where menudisplay='Y' and parentid='" .$parent_id . "' "; $sqlquery = " SELECT linkpage,moduleid,menuid,menuname,parentid,menudisplay FROM admnmenumaster where menudisplay='Y' and parentid='" .$parent_id . "' "; $result=sqlsrv_query($conn,$sqlquery); while($row = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)) { $menu .="<li class=treeview><a href='".$row['linkpage']."'>".$row['menuname']."</a>"; $menu .= "<ul class=treeview-menu>".get_menu_tree($row['menuid'])."</ul>"; //call recursively $menu .= "</li>"; //echo "HELLO<a href=$row[linkpage]>$row[menuname]</a>"; } return $menu; } ?> <?php echo get_menu_tree(0); //start from root menus having parent id 0 ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.