Results 1 to 2 of 2

Thread: Defendmyname, CSS problem - help needed

  1. #1
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Defendmyname, CSS problem - help needed

    Hello,
    Hope someone can help me fix this. Every page on a new site I'm working on loads but with the following script error:

    Line: 37
    Char. 7
    Error. 'menuitem1.thediv' is null or not an object
    Code 0

    This is the code with the offending line highlighted.


    <!--
    var time = 3000;
    var numofitems = 7;

    //menu constructor
    function menu(allitems,thisitem,startstate){
    callname= "gl"+thisitem;
    divname="subglobal"+thisitem;
    this.numberofmenuitems = 7;
    this.caller = document.getElementById(callname);
    this.thediv = document.getElementById(divname);
    this.thediv.style.visibility = startstate;
    }

    //menu methods
    function ehandler(event,theobj){
    for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
    }
    theobj.thediv.style.visibility="visible";
    }

    function closesubnav(event){
    if ((event.clientY <48)||(event.clientY > 107)){
    for (var i=1; i<= numofitems; i++){
    var shutdiv =eval('menuitem'+i+'.thediv');
    shutdiv.style.visibility='hidden';
    }
    }
    }
    // -->


    Makes no sense to me whatsoever. Ideas anyone?

    Thanks,
    Defendmyname

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    How is this a css problem?

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
  •