Navigation

See how you can access to different page in your GetQuanty widget

At this point, you can open/close the iframe panel using the provided launcher but the panel is on the standby mode so you see a blank page. Let's see how you can order the iframe to navigate to a specific page in order to gather the GetQuanty data your users need.

To perform an iframe navigation, you will need to open the iframe panel and send a 'navigate' message to the iframe with the given url. Here is an exemple of how this can be implemented :

// Opens the iframePanel and navigate to specified url
function navigateIframe(url) {
    const gqframe = document.getElementById('gqframe');
    openPanel();
    gqframe.contentWindow.postMessage({ type: 'navigate', url }, "*");
}