locked
Using an Iframe element - is it prohibited? RRS feed

  • Question

  • I am using an Iframe element in my office store task pane app, which on the click of the button displays https://www.bing.com.

    Will it work?

    Because my app got rejected showing the following error (which was given by seller dashboard team) - 

    "An add-on for this website failed to run.Check the security settings in internet options for potential conflicts."

    Please suggest an alternative option which will not change the purpose of my app.

    Tuesday, January 28, 2014 6:00 PM

Answers

  • Hi,

    >>Will it work? <<

    No. In fact, iFrame element is not recommended in Apps for Office. For a workaround, I suggest you using Bing API.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 29, 2014 9:44 AM

All replies

  • Hi,

    >>Will it work? <<

    No. In fact, iFrame element is not recommended in Apps for Office. For a workaround, I suggest you using Bing API.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 29, 2014 9:44 AM
  • Luna,

    Is this the reason why i am getting an error during app approval?

    Thanks!

    Yash!

    Wednesday, January 29, 2014 5:43 PM
  • Hi,

    Yes, I think so.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, February 6, 2014 8:56 AM
  • The iframe is supported in Office App. The apps Microsoft released also use it. But you need to set sandbox attribute as follows

    // Create iframe element
    var iFrame = document.createElement("iframe");
    iFrame.setAttribute("id", "ms_osf_sandbox");
    iFrame.setAttribute("class", "ms_osf_sandbox");
    iFrame.setAttribute("sandbox", "allow-scripts allow-same-origin");
    iFrame.setAttribute("tabindex", "-1");
    iFrame.setAttribute("src", SandboxInteraction.sandBoxHostURl.concat("/sandbox.html"));
    document.body.appendChild(iFrame);     

    The code source of Wikipedia app for your referrence.

    wikiappforoffice.codeplex.com

    Tuesday, February 18, 2014 5:39 AM
  • Hi Cathy;

    Does that mean I can also make a post to that iframe (cross-domain calls back and forth)? windows.postMessage API is fully supported?

    As far as I know, some IE versions have limitations on windows.postMessage API.

    Did you have any problems?

    Friday, December 18, 2015 1:05 PM
  • In your sample reference app, you have added search functionality in html page but if i want to use existing page button then how can i get? For example, how cani get the search button of bing from iframe?
    Monday, May 23, 2016 12:42 PM