<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Simple behaviour demo</title> <link href="../mathertel.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../controls/jcl.js"></script> </head> <body> <h1>Simple behaviour demo </h1> <div id="TimerSample" style="width:200px;height:50px;font-size:20pt;background-color:yellow">click here</div> <script type="text/javascript"> // TimerSampleBehaviour behaviour // 22.08.2005 created var TimerSampleBehaviour = { onclick: function (evt) { evt = evt || window.event; // get a compatible event object evt.srcElement.update(); }, // onclick update: function() { var d = new Date(); this.innerText = d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds(); } // update } // TimerSampleBehaviour jcl.LoadBehaviour(document.getElementById("TimerSample"), TimerSampleBehaviour); </script> <HR> <P>This sample uses HTML, Javascript and the XMLHTTP object on the client to call a WebService.</P> <P>This page is part of the <A href="http://ajaxaspects.blogspot.com/">http://ajaxaspects.blogspot.com/</A> project.</P> </body> </html>
This page is part of the http://www.mathertel.de/AJAXEngine/default.aspx project. For updates and discussions see The AJAX Engine blog.
For updates and discussions see http://ajaxaspects.blogspot.com/.