jwesly
jwesly

Reputation: 19

Office.js Excel Add-In Dialog Prompts to open in new window even though Dialog host is same as function file host

From my manifest.xml

            <bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://localhost:4000/excel-refresh" />

From my function file

            Office.context.ui.displayDialogAsync('https://localhost:4000/excel-dialog?action=loading', {height:50, width:50}, dialogCallback)

Instead of loading my page in Excel Online itself, the add-in prompts me to open it in a new tab. After clicking Allow, my html page does load in a new tab. I am using the same host and port so this should not be happening.

Screenshot of generic popup that appears

Upvotes: 0

Views: 638

Answers (1)

Rick Kirkham
Rick Kirkham

Reputation: 9684

Based on the comments under the OP's question, the solution is to pass and Options object to the call of displayDialogAsync that sets displayInIframe to true. Example:

displayDialogAsync("https://myDomain/myPage.html", {height:50, width:50, displayInIframe: true}, dialogCallback);

Upvotes: 1

Related Questions