Timer event by DynAPI : Timer Event : Ajax Layer JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Ajax Layer » Timer Event »

 

Timer event by DynAPI




<html>

<head>
<title>DynAPI Examples - TimerX Class</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('./dynapisrc/');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.api');
dynapi.library.include('dynapi.fx.TimerX');
</script>
<script language="Javascript">

myLayer=new DynLayer(null,135,100,130,50,'#00A000')
myClock=new DynLayer(null,270,100,200,50,'#0000A0')

myLayer.addEventListener({
  ontimer:function(e){
    var o=e.getSource()
    var src='<font size=face=arial color=#ffffff>&nbsp;Tick @ 200ms <br>&nbsp;Tick count='+o.getTickCount()+'</font>'
    o.setHTML(src)
  }
})

myClock.addEventListener({
  ontimer:function(e){
    var o=e.getSource()
    var src='<font size=face=arial color=#ffffff>&nbsp; '+new Date()+'</font>'
    o.setHTML(src)
  }
})

myLayer.startTimer(200)
myClock.startTimer(1000)

dynapi.document.addChild(myLayer)
dynapi.document.addChild(myClock)

</script>
</head>

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

</body>
</html>

           
       

Download : Download nav_dynapi.zip nav_dynapi.zip


-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Ajax Layer
» Timer Event