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

Adding Whatfix widgets within frames

  • Print
  • Dark
    Light

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, w3schools.com is hosted in an iframe on a different website.

w3schools_iframe.png

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='//whatfix.com/<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.
Limitations
  • 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?