Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    62
    Thanks
    1
    Thanked 0 Times in 0 Posts

    needing a code editor!

    I'm still new at Javascript and was wondering if someone could double check my coding on this function. I already know the array, parIDs, is filled and that the variable, id, has a value assigned to it. Also, toggleNode is a function. Thanks in advance for your help!

    function CloseNodes(id){
    var b=0;
    for (b=0; b < 10; b++){
    if(parIDs['b'] != id){
    toggleNode;
    }
    }
    };

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    You're just naming the function, you never call it.

    toggleNode; -> toggleNode();
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

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