JavaScript Clock : Clock « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Event
7. Event onMethod
8. Form Control
9. GUI Components
10. HTML
11. Javascript Collections
12. Javascript Objects
13. Language Basics
14. Node Operation
15. Object Oriented
16. Page Components
17. Security
18. Style Layout
19. Table
20. Utilities
21. Window Browser
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
JavaScript DHTML » GUI Components » Clock 
JavaScript Clock


<html>
<head>
<title>DynAPI Examples - HTML Clock</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.api');
dynapi.library.include('TemplateManager');
dynapi.library.include('HTMLClock');
dynapi.library.include('FlashSound');
</script>
<script language="Javascript">

fs = new FlashSound();
fs.setSWF("images/sndfx.swf");
HTMLComponent.setFlashSound(fs)// Set FlashSound object for all HCs

// Mozilla will collapse/expand table cells whenever the content of the layer changes. To solve this, specify a width for your table cells
var tp = new Template('This clock will alarm every 15 seconds<br><br><center><table background="images/blue_back_strip.gif" border="0"><tr><td width="90" height="90">{@fld}</td></tr></table></center>',100,100,200,200,'#EEEEEE');

tp.addChild(new HTMLClock(),'fld');
tp.fld.sndOnAlarm = '/alarm@start';

var dt = new Date();
dt = Date.parse(dt)+15000
tp.fld.setAlarm(dt)// or we could do tp.fld.setAlarm('13:30:00');
tp.fld.addEventListener({
  onalarm : function(e){
    var dt = new Date();
    status='This is an alarm @' + dt;
    dt = Date.parse(dt)+15000
    tp.fld.setAlarm(dt);
  }
});
dynapi.document.addChild(tp);


</script>
</head>

<body>
<script>
  dynapi.document.insertAllChildren();
</script>

</body>
</html>

           
       
dynapi.zip( 791 k)
Related examples in the same category
1. Fancy Clock
2. JavaScript Clock (2)
3. Live image clock
4. Digital Clock
5. Military Clock
6. Standard Clock
7. Animation: clock
8. Simulates a stop watch and displays the elapsed time
9. Calendar with Clock
w___w__w.___j_a___v_a2__s___.___c__o___m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.