SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: My dnamic mnu

  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My dnamic mnu

    Hello

    I want create menu from a table in a MySQL PHP

    I used this java script menu :

    http://www.dynamicdrive.com/style/cs...enu-vertical/#


    I wrote this code :

    Code:
    
    

    So it can not show submenues because have some problem

    What is the problem in creating dynamic li and ul in my code ?
    Last edited by bakhanbeigi; Jul 8, 2007 at 13:16.

  2. #2
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need only a export like this :

    Code:
    <div class="suckerdiv">
    	<ul id="suckertree1">
    	  <li></li>
    	  <li></li>
    	  <li></li>
    	  <li></li>
    	  <li></li>
    	  <li></li>
    	  <li></li>
    	  <li></li>
            </ul><ul>
    	  <li></li>
    	  <li></li>
    	</ul><ul>
    		<li></li>
    		<li></li>
    		<li></li>
    		<li></li>
    		<li></li>
    	</ul>
    </div>

  3. #3
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean that it did not print some of the closing tags for ul and li es? And also can i see how you have called the class to print the menu?
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  5. #5
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it dont print some of them

    I call like this :

    Code:
    require_once('menu.class.php');
    $menu = new menu ("", "./script.js", 'rtl');
    echo $menu-> computeHead ();
    require_once('DB/dbconn.php');
    $result = $db->getAll("SELECT id , pid as parent , name as content,id as href  FROM `menu`");
    for ($i=1;$i<=count($result);$i++)
    {
       $menu-> addItem ($result[$i]['parent'], $result[$i] ['id'],$result[$i]  ['href'] == '' ? '#' : $result[$i] ['href'] ,$result[$i] ['content']);
    
    
    }
    echo $menu-> computeBody ();


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •