How to include online content in your help
Collapse the table of content
Expand the table of content

How to include online content in your help (HTML)

You can also use online help by conditionally showing an iframe if the user is online. In this example, a toggleHelp function is designed to conditionally show or hide two divs, based on whether a user's computer is online or offline. The function could be loaded into the help page either on Body load or button click (user taps Help).


Step 1: Add a function to toggle help depending on whether the user is online.

function toggleHelp() {
    var onlineDiv = document.getElementById("onlineHelp");
    var offlineDiv = document.getElementById("offlineHelp");
    var condition = ((navigator.onLine) ? 'online':'offline');
    if (condition=='online') { = "inline"; = "none";
    else if (condition=='offline') { = "none";
        offlineDiv.Style.display = "inline";

Step 2: Add the online and offline divs and an iframe to show online content in your help page.

<div id="onlineHelp">
    <iframe src="ms-appx://LinkToOnlineHelpPage" frameborder="0" sandbox=""/> 

<div id="offlineHelp"> 
    It looks like you’re not connected to the Internet. 
    You need to connect in order to get help.

Related topics

App settings sample
Guidelines for app help



© 2017 Microsoft