Display current time in a Scriptcase menu application

Show the current time refreshing in a menu application (Scriptcase)

In Scriptcase projects you can show the current time interactive.
Best to use is the menu application, cause it usually wraps the other applications of a project.

1. Define the position of the timer

Fist you have to define the position where to display the time.
As sample we’re setting the value in the menu structur as the short  HTML code <div id='my_time'>timer</div>

Platzieren des Timers im Menü

The element where the time is to be shown is named my_time.

2. Code to show the time

The menu-Application currently do not have  Programming > JavaScript Methods

Therefore we add the code in the menu’s onLoad event:


Using  window.onload = function(){ ensures that the functions will not be started untill the entire window is displayed. Not doing so would possibly start the functions when the <div> element is not existient.

Executing the menu application shows the current time:

Timer-Anzeige rechts im Menü


Posted in Scriptcase Sniplets Tagged with: , , , , , ,