0

On a webpage, I have a simple script to refresh the page when the browser resizes to force an embedded Tableau file to resize correctly:

window.addEventListener('resize', function () {"use strict"; window.location.reload();})

I'm running into a problem using this script when the user tries to print the page using the browser's print button - the page reloads, and cancels the printing. How can I force the reload/resize event without affecting the print functionality?

Idan
  • 5,405
  • 7
  • 35
  • 52
  • I would imagine there is a way to resize a table that doesn't involve refreshing the page - can you provide more details on what this 'Tableau file' is? – Our_Benefactors Aug 03 '17 at 18:18
  • reload on refresh, sounds like a bad design. – epascarello Aug 03 '17 at 18:23
  • Possible duplicate of [Refresh page on resize with javascript or jquery](https://stackoverflow.com/questions/14915653/refresh-page-on-resize-with-javascript-or-jquery) – Moumit Aug 03 '17 at 18:27
  • A Tableau file (Tableau Server) is an interactive data charting file, like Business Objects or Google Charts. My page, itself, is responsive. It's this file that requires a refresh to initiate a resize to fill any changes to the browser window size. – commcordinator Aug 04 '17 at 12:19

0 Answers0