Hi Peter,

you made it update; but you are using the same time all the time.

http://www.avenum.com/net.data/test/os400time2.ndm/start

%HTML (START) {
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
var digital = new Date();
@DTW_TIME("N",mytime)
digital.setHours(@DTW_rSUBSTR(mytime,"1","2"));
digital.setMinutes(@DTW_rSUBSTR(mytime,"4","2"));
digital.setSeconds(@DTW_rSUBSTR(mytime,"7","2"));

function clock() {
        if (!document.layers && !document.all) return;
        digital.setTime(digital.getTime() + 1000);
        var hours = digital.getHours();
        var minutes = digital.getMinutes();
        var seconds = digital.getSeconds();
        if (minutes <= 9) minutes = "0" + minutes;
        if (seconds <= 9) seconds = "0" + seconds;
        dispTime = hours + ":" + minutes + ":" + seconds;
        if (document.layers) {
                document.layers.pendule.document.write(dispTime);
                document.layers.pendule.document.close();
        }
        else
                if (document.all) pendule.innerHTML = dispTime;
        setTimeout("clock()", 1000);
}
//  End -->
</script>
<style type="text/css">
#pendule
{       border:1px solid blue;
        background-color:lightblue;
        padding:2px;
        font-weight:bold;
        text-align:right;
        position:absolute; top:20px; right:20px;
}
</style>
</head>

<BODY onLoad="clock()">

<span id="pendule"></span>


</body>

</html>
%}



-- 
Mit freundlichen Grüssen / best regards

Anton Gombkötö
Organisation und Projektleitung

Avenum Technologie GmbH
Wien - Salzburg - Stuttgart
http://www.avenum.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.