I need to display on each page of my application the current date-time. I use the following JavaScript: <script type="text/javascript"> var timerID = 0; function aff_heure() { var d=new Date() var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" ) var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec ") document.write(weekday[d.getDay()] + " ") document.write(d.getDate() + ". ") document.write(monthname[d.getMonth()] + " ") document.write(d.getFullYear()+ ",") document.write(d.getHours()) document.write(":") document.write(d.getMinutes()) document.write(":") document.write(d.getSeconds()) timerID = setTimeout("aff_heure()",1000); } </script>
I placed this code in a file date.jsp and when I defined my tiles I included this attribute: <definition name="site.mainLayout" path="/tiles/layouts/classicLayout.jsp"> <put name="title" value="Tiles Blank Site" /> <put name="header" value="/tiles/common/header.jsp" /> <put name="menu" value="site.menu.bar" /> <put name="date" value="/tiles/common/date.jsp" /> </definition> To sart the aff_heure() it is said to do <body onload="aff_heure()"> but when I do that in the classicLayout.jsp page, only one number (minute or second) is displayed, and not all the page. Is it possible to use JavaScript with Tiles ? Thanks in advance Sandra -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>