Javascript only showing in editor, not in preview

  • 1
  • Problem
  • Updated 1 year ago
When I am using this script: https://pastebin.com/YCt3s9DM that is to count down for christmas, it only shows the countdown in the editor in chrome and not in the preview (or in the rise player for windows 10). Why is that?

Editor in chrome:

Preview:
Photo of TBS/YG VST

TBS/YG VST

  • 122 Points 100 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Darius - PRODO.us

Darius - PRODO.us, Champion

  • 26,850 Points 20k badge 2x thumb
Scripts often do not work in preview. You need to push it to an actual screen to see if/how it works.
Photo of TBS/YG VST

TBS/YG VST

  • 122 Points 100 badge 2x thumb
Same when pushed to the screen!
Photo of Darius - PRODO.us

Darius - PRODO.us, Champion

  • 26,850 Points 20k badge 2x thumb
Ok, i  can confirm that all works in my prewiev (Win10 PC) and on the actual Win10 PC player. Could you email me (prodo.us@mail.com) the code you used in that placeholder? Have you modified the source code in any way? Are you using HTML Widget in a placeholder. If so, what size is the placeholder?

I believe the date portion gets cut off because of the weird CSS properties in the source code.

OR

you can try modifying now the '#picture img' CSS properties. Change 'width:75%' to 'height:80%'
(Edited)
Photo of TBS/YG VST

TBS/YG VST

  • 122 Points 100 badge 2x thumb
I was using the old editor. I made a new presentation with the new editor. The html widget works with the new editor!
Photo of Darius - PRODO.us

Darius - PRODO.us, Champion

  • 26,850 Points 20k badge 2x thumb
Just out of curiosity I tested this same thing in the 'classic editor' (I do not work with the old editor anymore) and it also worked, both in preview and published. Not sure what the problem was.
Photo of TBS/YG VST

TBS/YG VST

  • 122 Points 100 badge 2x thumb

Ah, alright. It didn't take a lot of work to move away from the old one though. I guess the person who tended it before me had left something bad in the placeholder. It was about time to start using the new UI anyway, much better to use imo.
All's well that ends well! Thanks =)