bugfix: form active page reload and locally stored image is not

displayed
This commit is contained in:
Florian 2014-02-16 00:51:37 +01:00
parent b69d61143e
commit 1adff22c4b
1 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ function initReady(fn) {
//hide the form, and switch on camera
function initViewer() {
var display = document.getElementById('screen');
var tempCam = parseInt(localStorage.getItem('cam'));
formActive = localStorage.getItem("formActive");
@ -41,8 +41,9 @@ function initViewer() {
//if form was displayed, when page was reloaded, display form
if (formActive == 1) {
showForm();
displayCamNumber();
display.innerHTML += '<img id="camImage" src="http://' + camHost + '/cam/' + cam + '/stream.mjpeg" />';
showForm();
}
else {
formActive == 0;