Source

seating-planner / seating_planner / templates / download_iframe.html

Full commit
<html>
  <head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  </head>
  <script type="text/javascript">
    $SCRIPT_ROOT = {{ request.script_root|tojson|safe }};
  </script>
  <body>
    <form method="POST" action="{{ url_for('download_file') }}">
      <textarea name="data"></textarea>
      <input type="text" name="filename">
    </form>
  </body>
  <script type="text/javascript">
    var data = $(window.parent.document).find("#file-data-raw").val();
    $('textarea').val(data);
    $('input').val($(window.parent.document).find("#file-name").val());
    $('form').submit();
  </script>
</html>