summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/cctv-control.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/cctv-control.js b/js/cctv-control.js
index b4e6fa7..4732b30 100644
--- a/js/cctv-control.js
+++ b/js/cctv-control.js
@@ -131,12 +131,30 @@ function showForm() {
display2 = document.getElementById("formImage"),
stor = localStorage.getItem("snapShot");
+ var d = new Date();
+
+ var date = d.getDay();
+ date += '/';
+ date += d.getMonth();
+ date += '/';
+ date += d.getFullYear();
+
+ var time = d.getHours();
+ time += ':';
+ time += d.getMinutes();
+ time += ':';
+ time += d.getSeconds();
+ time += ' Uhr';
+
//display loaded image
if (stor) {
display1.setAttribute("src", stor);
display2.setAttribute("src", stor);
}
+ //insert date in date-field
+ document.getElementById("formDate").value = date + ' ' + time;
+
//make form visible
document.getElementById("form").style.visibility = 'visible';
formActive = 1;