Results 1 to 8 of 8

Thread: explode.js

  1. #1
    Join Date
    Aug 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default explode.js

    I have been asked to help update a web site for my local church. Thier site uses the explode.js as the menu on the left side of the page. when the menu is clicked I get an error stating that an object is expected. It seems like the error is in the line:

    <body onload="gogirl('Couples_Ministry');init();">

    I can do the (x)html and css necessary to bring the site up to standards but I am not profecient in javascript
    Can any one help with this one??

    thanks

    Chloe

    site is www.udlc.org

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Either the function gogirl() isn't valid, or the object "Couples_Ministry" isn't valid. Either way, I need to see the script
    - Mike

  3. #3
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    you haven't defined init(). You should either remove it.
    Code:
    <body onload="gogirl('Couples_Ministry')">
    or define it in explode.js
    Code:
    function init(){
    //Do something
    }

  4. #4
    Join Date
    Aug 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it looks to me like the function gogirl is defined.
    the error happens whenever you use the left nav panel
    it can be at the either in the major categories or the sub categories in the menu.

    javascript is:



    function gogirl(e) {
    hideall();
    if (document.getElementById(e).style.display == 'none') {
    document.getElementById(e).style.display = 'block';
    } else {
    document.getElementById(e).style.display = 'none';
    }
    }

    function hideall() {
    //var Nodes = document.getElementsByTagName('ul');
    var Nodes = document.getElementById('exploderMenu').getElementsByTagName('ul');
    var max = Nodes.length;
    for(var i = 0;i < max;i++) {
    var nodeObj = Nodes.item(i);
    nodeObj.style.display = 'none';
    }
    }

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    it looks to me like the function gogirl is defined.
    gogirl() is. init() isn't.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Aug 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can i safely remove init() or do i need to do something more??

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Since the script seems to work OK, I'd say to remove the call to init().
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Aug 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks I will try it tonight!!

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
  •