bugfix: enter triggers hide form, after form display due to focus

This commit is contained in:
Florian 2014-02-16 00:58:49 +01:00
parent 1adff22c4b
commit 010549c411
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@
<script src="js/cctv-control.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/cam.css">
</head>
<body onkeydown="keyDown(event)">
<body onkeydown="keyDown(event)" id='body'>
<div id="screen">
<img src="img/testbild.gif" id="camImage">
</div>

View File

@ -153,7 +153,9 @@ function hideForm() {
localStorage.setItem("formAnalysis2", document.getElementById('formAnalysis2').value);
localStorage.setItem("formAnalysis3", document.getElementById('formAnalysis3').value);
//hide form
//hide form and unfocus button
//otherwise next enter press will trigger print-function
document.getElementById('printButton').blur();
window.open('print.html', 'Printlayout');
document.getElementById("form").style.visibility = 'hidden';
formActive = 0;