Reputation: 1228
I have 2 buttons on the ribbon in Office 365 word addin.
...
<Action xsi:type="ShowTaskpane">
<TaskpaneId>button1</TaskpaneId>
<SourceLocation resid="myURL" /> // ~remoteURL/pages/text.html?seacrhtype=1
</Action>
...
..
<Action xsi:type="ShowTaskpane">
<TaskpaneId>button2</TaskpaneId>
<SourceLocation resid="MyURL.Url" /> //// ~remoteURL/pages/text.html?seacrhtype=2
</Action>
..
I open the same html page and pass query param based on which ribbon's button click.
The issue which I am facing is that when I click on a button1, it opens a task pane.
If I click on button2, it opens another task pane without hiding/closing the first task pane which already opened so I have 2 task pane on the same word page.
Is there any way so at a time, only one task will be open? If I click on a different button then only that related taskpane will open and work.
How can I hide the first task pane when I click on the second button and vice versa?
Thanks in advance
Upvotes: 1
Views: 223
Reputation: 49455
The closeContainer method closes the UI container where the JavaScript is executing. The behavior of this method is specified by the following:
Upvotes: 0