2 Replies Latest reply on Dec 9, 2010 4:08 PM by Roy Marshall

    [JS][CS5] Closing a session palette

    Roy Marshall Level 1

      Hi.

       

      I have made a session palette that triggers certain scripts, but I need to be able to close the palette.  There is a red close button on the top left of the palette, but that has no effect.

      I have written code for a close button, but that doesn't work either, although it did work once!

      #targetengine "session"
      ...
      var myDialog = new Window('palette' , 'xxx Formatter');
      ...
      var Cancel = myPane.add("button",undefined,"Close");
      ...
      Cancel.onClick = function (){
          myDialog.close();
          }
      myDialog.show();
      
      

       

      I can post the whole code if it helps, but above are the relevant lines as far as I can see.

       

      The button is visible.

       

      Cheers

       

      Roy