Report any technical problems you discover and discuss solutions.

Embed content (HTML+JS) only shown on 2nd viewing

  • Susanne
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
10 jaren 3 maanden geleden #3620 door Susanne
I've added an embded content page, on which I've put my HTML+JS. For the sake of the example, let's say I've put it on page 3. Now, when I do the following:
- play project
- step to page 2
- click on arrow to go to next page
Now, the counter in the bottom right will still display '2/8', the title of page 3 *is* shown, but the content is not. If I click the next button again it will take me to page 4, and then when I click back to page 3 it *does* show the content of page 3.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • Susanne
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
10 jaren 3 maanden geleden #3629 door Susanne
Beantwoord door Susanne in topic Embed content (HTML+JS) only shown on 2nd viewing
I have fixed it.

My Google charts component was loading too slowly (at least, in Xerte, not when I run it stand-alone).

Previously, this would not work, as on the first viewing of the page loading was not yet finished and I would get an 'google is not defined' error:
Code:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); </script>

This does work:
Code:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> LoadGoogle(); function LoadGoogle() { if(typeof google != 'undefined') { google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); } else { // Retry later... setTimeout(LoadGoogle, 30); } } </script>

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ronmjultenJohnSmith
Tijd voor maken pagina: 0.127 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo