2 Replies Latest reply on May 19, 2014 10:23 AM by janslort

    Count down digital clock to show on Popover button

    janslort

      Title

      Count down digital clock to show on Popover button

      Post

           Gads!! FM 13 is awesome guys.  The new Popover Button feature deserves a big "Attaboy".  Now I want to feature a popover showing a digital clock counting down from a time in minutes to zero.  Then a sound warning that time is up.  I have this on my IPhone, but I can't find anything I could grab for my FM app.
           I'm on a PC windows 7, running FM 13 ADV.

           Thanks  J

           Jan

        • 1. Re: Count down digital clock to show on Popover button
          philmcgeehan
               I only have FMP12A at the moment, so still haven't had the chance to use Popovers yet, but I do have a Countdown clock that is used on one of my layouts.
               I don't know about getting it to trigger a sound though.
               It is JavaScript run in a WebViewer.
               The following code goes in the web address of the Web Viewer and set it to be not interactive.
                
          "data:text/html,<html><head>  <script language='javascript' type='text/javascript'>  function displayClock() {  var digital = new Date();  var hours = " & Hour ( table::CDtime ) & "-digital.getHours();  var minutes = " & Minute ( table::CDtime ) & "-digital.getMinutes();  var seconds = " & Second ( table::CDtime ) & "-digital.getSeconds();   if (minutes <= 9) minutes = '0' + minutes;  if (seconds <= 9) seconds = '0' + seconds;  dispTime = '- ' + hours + ':' + minutes + ':' + seconds;  document.getElementById('time').innerHTML = dispTime;  setTimeout('displayClock()', 1000);  }  </script></head> <body style=  'font size:24;  font-family:Arial;  background-color:rgb(0,45,98);  color:rgb(172,0,0);  margin-left: 0px;  margin-top: 0px;  margin-right: 0px;  margin-bottom: 0px;  text-align:right;  border:0;  margin:0;  padding:0'  onload='displayClock()'>  <div id='time'></div></body></html>"
                
               I set the CDTime to a second before I want it to get to zero (i.e., 16:59:59)
          • 2. Re: Count down digital clock to show on Popover button
            janslort

                 Thanks Phil.  Looks good.

                  

                 Jan