Adding Whatfix widgets within frames
  • 1 minute to read
  • Print
  • Dark

Adding Whatfix widgets within frames

  • Print
  • Dark

Whatfix walkthroughs render well with iframes/framesets, without any additional effort.

However, in some cases, applications are opened within an iframe itself with the added constraint of not having script control on the host page. This article explains how you can integrate Whatfix widgets (Self-Help and Task List) into such applications.

For example, in the image below, is hosted in an iframe on a different website.


To create a walkthrough:

  1. Open your application in a separate window.
  2. Use the Whatfix editor to create Whatfix content.
  3. Ensure Whatfix widgets are working as expected.
  4. To enable support for your application in an iframe, add the top variable to the Whatfix HTML snippet that is added to your application.
    Here's an example:
    <script language='javascript'>window._wfx_settings={"top":window};</script>
    <script language='javascript' async='true' type='text/javascript' src='//<your account id>/embed/embed.nocache.js'></script>
    If your application has additional iframes/framesets, point the **top** variable to the main iframe. Use the **window.parent** browser variable to achieve the same result.
  • Tasklists and Self Help are supported only on the same page in the live_here mode.

  • Walkthroughs do not follow tasks outside your page into sub-windows or tabs.
Was this article helpful?