MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Dynamically update html

    Scheduled Pinned Locked Moved Development
    2 Posts 1 Posters 1.0k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      bureus
      last edited by

      Hi,

      I have created a departure board for public transportation, including real time updates to departure time within the module. The board is updated every 20s, by passing notifications from node_helper that updates the DOM thru getDom function. Challange is that i have a marquee element within my HTML that i dont would like to be reset every 20s, instead i would like that HTML element to be kind of static within the module.

      Is there any possibility of not refreshing the complete HTML, like using “updateDom” instead of “getDom” so that my marquee element is not reset?

      BR

      1 Reply Last reply Reply Quote 0
      • B Offline
        bureus
        last edited by

        I resolved it by implementing a updateBoard function that checks if tables has been rendered and if just updates the innerHTML of that div. Was great to read ANOTHER WAY TO CONTROL OUTPUT in the beginners KB, https://forum.magicmirror.builders/topic/8534/head-first-developing-mm-module-for-extreme-beginners

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy