This documentation page assumes that you already have a SeekTable account. Create your free account by signing up.

Restore Embedded Report State

When embedded report has report parameters (inputs) in some cases it is useful to save user-entered values and restore them on next time when the report is opened. This behaviour may be easily added with simple JS code that should be added to the 'host' web page in addition to the iFrame:

  1. Your account needs to have an active Advanced Publishing subscription. You may activate a free 14-day trial on the "Manage Account" view (top-right menu).
  2. Use parameter_change_notify=1 URL parameter in iFrame's src to enable a callback from iFrame to the 'parent' web-page; in this way you'll able to save user's input each time when parameters are changed. For example:
    <iframe id="embedded_report" name="embedded_report" border="0" frameborder="0" 
      width="800" height="600" scrolling="no" style="overflow:hidden"      
  3. Add the following code to the 'host' web page to handle this callback:
    window.addEventListener("message", function (event) {
      if (! return;
      var msg = JSON.parse(;
      switch (msg.action) {
        case "onReportParametersChanged":
          // js code that saves parameters for the report in the iFrame is here
  4. Next time when host page is opened saved report parameters may be passed to iFrame with report_parameters in the iFrame's URL.

Online demo that saves embedded report parameters in the localStorage: restore user-entered parameters example.