Changeset 351 in tmcsimulator for trunk/webapps/gotoxmltime.html
- Timestamp:
- 03/31/2019 10:20:47 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/gotoxmltime.html (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/gotoxmltime.html
r348 r351 8 8 overflow-x:hidden; 9 9 } 10 #clockdiv { 11 font-size: xx-large; 12 font-weight: bold; 13 font-family: "Lucida Console", Monaco, monospace; 14 } 10 15 </style> 11 16 <body> 12 17 <!-- Prototype for a display that scrolls to the current time --> 13 <div id=" timediv">0:00</div>18 <div id="clockdiv">0:00</div> 14 19 <div> <button onclick="scrollToCurrent()">Goto Current Item</button></div> 15 20 <div id="main" class="pic-container"></div> … … 20 25 var xmlDoc; 21 26 var currElement; 22 var timeDiv = document.getElementById("timediv");27 var clockdiv = document.getElementById("clockdiv"); 23 28 /** Load the sim clock file and extract the clock string */ 24 29 function gettime() … … 28 33 simclockjson = JSON.parse(response); 29 34 clockstring = simclockjson.clock; 30 timeDiv.innerHTML = clockstring; // Display current time35 clockdiv.innerHTML = clockstring; // Display current time 31 36 // Extract the seconds digits 32 37 digits = clockstring.substring(clockstring.length-2) … … 55 60 div.style.color = "black"; 56 61 div.style.background = "GhostWhite"; 62 div.style.height = 30; 57 63 div.innerHTML = MHSTime + " " + xmlDoc.getElementsByTagName("description")[idx].childNodes[0].nodeValue; 58 64 // Append it to the parent div … … 68 74 if (currElement != null) 69 75 { 70 currTime = timediv.innerHTML;76 currTime = clockdiv.innerHTML; 71 77 // Find the element with the id = seconds digits 72 78 target = findNearestElem();
Note: See TracChangeset
for help on using the changeset viewer.
