SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation 'document.listmenu0.firstlevel'is null or not an object? strange..urgent help needed.

    i'm including a chaine menu in my php page.
    as the page is excecuted, the error 'document.listmenu0.firstlevel'is null or not an object is shown. it is pointed to the below line:

    <body onload="initListGroup('chainedmenu', document.listmenu0.firstlevel, document.listmenu0.secondlevel, 'savestate')" TOPMARGIN="0" RIGHTMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" TEXT="#000000" BGCOLOR="#ffffff" >

    thus, nothing is shown in the chaine menu..

    can i know where is the error?

    i tried to run the chaine menu page seperately, it works just nice. however,after i included it to the php page, the error above occur...

    p/s: as the page is tested in locahost, the error message is not shown and the chaine menus are display correctly..

    attached here the sample chained menu...
    Attached Files Attached Files
    Last edited by liyenn; Dec 30, 2006 at 19:12.
    newbie...

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Assuming there are no errors in your code, I am assuming that onload is firing before the page has actually completely loaded. Try

    Code:
    window.onload = setTimeout("initListGroup('chainedmenu', document.listmenu0.firstlevel, document.listmenu0.secondlevel, 'savestate')", 100)
    instead?


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
  •