0 Replies Latest reply on May 10, 2013 5:16 PM by rossbb

    Remove a Dynamically Added Child Symbol

    rossbb Level 1

      I am trying to check if a symbol exists, and if it does remove it. Otherwise, add it. Since this is being added to a bettun, the goal is that an object shows up when you click and goes away when you click again.


      My current code is below. Help?!



      var chatPanel = sym.getSymbol("chat_wrap").getChildSymbols;


      if (chatPanel.length > 0) {





      else {

          // handle the error however you want here, or fail silently

          sym.createChildSymbol("chat_panel", "chat_wrap");

          console.log("symbol added")