0

I need to build a chart with the Chart.js library.

I've got a strange behavior with Firefox: the charts behaves randomly, sometimes it's OK and sometimes I need to click several times on my button.

Does anyone know of a method in JavaScript to force the reload via a simple button like this?:

<a href="javascript:window.location.reload(true)" class="refresh">Refresh the page</a>
cabrerahector
  • 3,653
  • 4
  • 16
  • 27
Bruno
  • 1

1 Answers1

1

To see the other ways to reload the page you can check this comment https://stackoverflow.com/a/7632005/17542117, but most likely browser should be reloading with your code snippet itself.

If you are still facing the issue try the following things,

  1. try to narrow down the places where you have to click multiple times
  2. check if you see an invisible overlay over the button which could be blocking your click action. (try placing the button from the top to the bottom of the screen while scrolling and try clicking it at multiple positions, this might help you too to find if invisible overlay is only in a specific portion of the screen)
  3. try to see if your click function throws any console errors which can block your JS code execution on the click action.
Dharman
  • 30,962
  • 25
  • 85
  • 135