10 Replies Latest reply on Nov 19, 2014 5:05 AM by Stamm

    Update the Window onChange?

    Stamm Level 1

      Hey guys,

       

      how can I update my window with the onChange event? My solution works, but I need the groups to collapse when not visible.

      w.DD.onChange = function() {

           switch (this.selection.text){

                case 'Headline':

                     if(w.visiblegroup)

                     w.visiblegroup.visible = false;

                     w.visiblegroup = w.texted;

                     w.texted.visible = true;

                break;

           }

      }

      I have tried to use w.show, w.update(with documentation, still not sure what .update actually does) after adding the elements in the case itself. But I can't figure this out.

      w.DD.onChange = function() {

           switch (this.selection.text){

                case 'Headline':

                     w.add('checkbox', undefined, 'User-Color');

                     //w.show();

                     w.update();

                break;

           }

      }

      Does anyone have a clue how this might work?

      Thanks in advance!