Trying to trigger a panel state in a current browser window from a link in a pop up window


#1

I have created a prototype where I have the main prototype in a browser tab and when I click the link in it, it opens a pop up window. The pop up window has a link in it and I want that link to change the sate of a panel in the prototype in the original browser tab that I now have. Is there a way to do this?

Thanks,
MIke


#2

Hi!

There is a way, but it requires adding some javascript to the link in the popup. You can add javascript via the Open Link in Current Window command using its “external URL” field.

Axure has its own javascript API, which you’ll find documented by some generous soul here. That’s what I used for this sample. Note that you can set a state only by number here, not by name. Assuming the name of the panel is “myPanel” and you want to switch it to its second state, the javascript goes like this:

javascript:
void(
  window.opener.$axure('@myPanel').SetPanelState(2, {})
);

The dynamic panel will receive the OnPanelStateChange event, so if you need to do anything further upon changing the state, handle that event, as is done in the sample file.

Preview

file: changePanelStateFromPopup.rp (65.5 KB)


#3

Thanks. This worked great! I appreciate the quick response.