Refresh javascript time
If have implemented these lines of code in order to get the date including time (via embedded html). The problem is that the time does not automatically refreshes, i understand that i can use the duration option but then the the time is never truly accurate and it flikkers all the time. Is there an option to overcome this problem in order to get the real time?
<script type="text/
<!--
var TheFontFace = "Arial";
var TheFontColor = "#000000";
var TheFontSize = "3";
var TheFontStyle = "";
var TheFontSizeTime = "5";
var TheFontStyleTime = "bold";
var FontTagLeft = "";
var FontTagRight = "";
if (TheFontStyle == "bold"){
FontTagLeft = "<b>";
FontTagRight ="</b>";}
if (TheFontStyle == "italic"){
FontTagLeft = "<i>";
FontTagRight ="</i>";}
if (TheFontStyle == "bolditalic"){
FontTagLeft = "<b><i>";
FontTagRight = "</i></b>";}
if (TheFontStyleTime == "bold"){
FontTagLeftTime = "<b>";
FontTagRigh
if (TheFontStyleTime == "italic"){
FontTagLeftTime = "<i>";
FontTagRigh
if (TheFontStyleTime == "bolditalic"){
FontTagLeftTime = "<b><i>";
FontTagRigh
var tijd_datum = new Date();
var dag = tijd_datum.
var dag2 = tijd_datum.
var maand = tijd_datum.
var jaar = tijd_datum.
var uur = tijd_datum.
var minuten = tijd_datum.
var seconden = tijd_datum.
var maandarray = new Array('januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december');
var dagarray = new Array('
var D = "";
D += "<font color='
D += FontTagLeft+
D += "</font>";
D += "<font color='
D += FontTagLeftTime+" <br> "+uur+"
D += "</font>";
document.write(D);
//-->
</script>
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Xibo Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Alex Harrington
- Solved:
- Last query:
- Last reply: