Forum Moderators: open
document.form1.end.value = Time; function display() {
setTimeout("display()",1000);
}
display(); <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" language="javascript">
function display() {
setTimeout("display()",1000);
}
display();
</script>
<script src="jquery-1.4.1.js" type="text/javascript"></script>
<script language=JavaScript>
$(document).ready(function() {
$('#reset').click(function() {
event.preventDefault();
$.post('ajax_null.php', function() {
window.location = "/graf.php?refresh=true&";
});
});
});
</script>
<script type="text/javascript" language="javascript">
function display() {
var Today = new Date();
var hours = Today.getHours();
var mins = Today.getMinutes();
var sec = Today.getSeconds();
var year = Today.getFullYear();
var day = Today.getDate();
var month = Today.getMonth() + 1;
var Time = ((hours < 10) ? '0' + hours : hours);
Time += ((mins < 10) ? ":0" : ":") + mins;
Time += ((sec < 10) ? ":0" : ":") + sec;
Time += ' ';
Time += ((month < 10) ? '0' : '') + month + '/';
Time += day + '/';
Time += year;
document.form1.end.value = Time;
setTimeout("display()",1000);
}
display();
</script>
</head>
<body>
<div>
<span style="display:inline-block; vertical-align:top;">
<strong>Tegn graf for:</strong>
</span>
<span style="display:inline-block; vertical-align:top;">
<img src="img_graphical.php" />
<form name="form1" action="/graf.php" method="post">
<input name="start" value="00:48:21 02/18/2010" />
<input type="text" name="end" value="00:48:21 02/20/2010" />
<input name="iterations" value="1800" style="width:55px;" />
<input type="submit" value="Oppdater" /><input type="submit" id="reset" value="Tilbakestil" />
</form>
</span>
<span style="display:inline-block; vertical-align:top;">
</span>
</div>
</body>
</html>