SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: error

  1. #1
    SitePoint Guru
    Join Date
    Sep 2007
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    error

    does anyone know why with this code it says error on pageon this code:

    Code:
    <?php
    include "global.php";
    
    $nocatquery = mysql_query("SELECT * FROM chatrooms WHERE cat = ''")
    or die("Could not insert data because ".mysql_error());
    ?>
    
    <head>
    <script type="text/javascript" src="simpletreemenu.js"></script>
    <link rel="stylesheet" type="text/css" href="simpletree.css" />
    </head>
    <body>
    <ul id="treemenu1" class="treeview">
    <?php
    while ($nocatqry = mysql_fetch_array($nocatquery)) {
    echo "<li>" . $nocatqry['name'] . "</li>";
    }
    ?>
    
    <script type="text/javascript">
    
    //ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))
    
    ddtreemenu.createTree("treemenu1", true)
    ddtreemenu.createTree("treemenu2", false)
    
    </script>
    </body>
    Animated Chatrooms - www.121chatrooms.net

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,479
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    pageon

    I don't see a "pageon" in the code. Where is it?

  3. #3
    SitePoint Guru
    Join Date
    Sep 2007
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what is a pageon
    Animated Chatrooms - www.121chatrooms.net

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,479
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    treeview

    I'm guessing the "pageon" was a typo. I took a look at the js src at the treeview site. Perhaps the problem is you are passing "treemenu2" as an argument to the function but you have no ul with that id? Can you post the actual error message (rather than "the page has an error")?

  5. #5
    SitePoint Guru
    Join Date
    Sep 2007
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there is no error msg kjust at the bottom of ie it says error on page and the folder icons dont display correctly it just has bullets.
    Animated Chatrooms - www.121chatrooms.net

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,479
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    error messages in IE

    The error messages aren't as easy to understand in IE as other browser's error consoles are, but you can see the message by clicking on the error icon in the status bar.

  7. #7
    SitePoint Guru
    Join Date
    Sep 2007
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thisis the error
    Animated Chatrooms - www.121chatrooms.net

  8. #8
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,751
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to take a look into debugging that with Web Developer Express. I wrote a guide on how to do that for tracking down javascript errors in IE:

    http://www.sitepoint.com/forums/showthread.php?t=535468

  9. #9
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,479
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    error

    I believe that error is from the simpletreemenu.js file
    Code JavaScript:
    ddtreemenu.createTree=function(treeid, enablepersist, persistdays){
    var ultags=document.getElementById(treeid).getElementsByTagName("ul")
    The "createTree" function is looking for a tag with the id passed to it's treeid argument.
    As I suggested before, if you call the function with
    HTML Code:
    ddtreemenu.createTree("treemenu2", false)
    and there is no tag with an id of "treemenu2" then document.getElementById("treemenu2") will not find anything and it will be "null or not an object".


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
  •