Popup page sending states

Q:
for one project I would like to change the state of a button when a popup is shown
is it possible to integrate this and so,
 
what are the type and feedback relations I have to use?

A:
You can use the following listener events to determine whether a page or popup is shown or not.  just change it for your specific popup and add the code to adjust the global variable in the function of the listener.

  // triggered when popup 1 is shown
  IR.AddListener(IR.EVENT_ITEM_SHOW, IR.GetPopup("Popup 1"), function(){
  IR.Log("SHOWING POPUP 1");
  });

  //triggered when popup 1 is hidden
  IR.AddListener(IR.EVENT_ITEM_HIDE, IR.GetPopup("Popup 1"), function(){
  IR.Log("HIDING POPUP 1");
  });

Is this article helpful for you?