<script type="text/javascript">function reloadSnapshot(id){ var obj = document.getElementById(id); obj.src = "http://10.176.11.21:8091/snapshot.cgi?user=admin&pwd=password"+"&count="+ (new Date()).getTime(); } function reloadview() { setTimeout('reloadSnapshot("foscam")',40)}; </script>
<input type="text" name="uname" id="uname" value="" /><input type="password" name="pword" id="pword" value="" /><button type="button" name="begin" onclick="dosomething()">Begin</button>
function dosomething() { var uname = document.getElementById('uname').value; var pword = document.getElementById('pword').value; if (uname == '') { alert('Please type your username!'); return false; } if (pword == '') { alert('Please type your password!'); return false; } var obj = document.getElementById('some_id_here'); obj.src = "http://10.176.11.21:8091/snapshot.cgi?user="+uname+"&pwd="+pword+"&count="+ (new Date()).getTime();}