diff options
author | Florian <stayawake@lavabit.com> | 2014-02-14 20:47:42 +0100 |
---|---|---|
committer | Florian <stayawake@lavabit.com> | 2014-02-14 20:47:42 +0100 |
commit | dea47420251777d66a8d96bcbc35bc1518f9c181 (patch) | |
tree | 291722fe6a11678adb005079dc2b7e3e879a8432 /js | |
parent | ff08105be4a6b173e9ec6acb573f208443d5a8d9 (diff) |
form data is saved in localstorage on pressing of printButton
Diffstat (limited to 'js')
-rw-r--r-- | js/cctv-control.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/js/cctv-control.js b/js/cctv-control.js index 5f18108..54d158a 100644 --- a/js/cctv-control.js +++ b/js/cctv-control.js @@ -14,7 +14,7 @@ var cam = 0; var camHost = "127.0.0.1:8080"; var controlHost = "127.0.0.1:8080"; -var formActive = 0; +var formActive = 0; //crazy errors if boolean is used here... //create event which is triggered when DOM is ready window.onDomReady = initReady; @@ -130,6 +130,15 @@ function showForm() { function hideForm() { + + //save data + localStorage.setItem("formName", document.getElementById('formName').value); + localStorage.setItem("formDate", document.getElementById('formDate').value); + localStorage.setItem("formAnalysis1", document.getElementById('formAnalysis1').value); + localStorage.setItem("formAnalysis2", document.getElementById('formAnalysis2').value); + localStorage.setItem("formAnalysis3", document.getElementById('formAnalysis3').value); + + //hide form document.getElementById("form").style.visibility = 'hidden'; formActive = 0; localStorage.setItem("formActive", formActive); |