please tell me why is this code not working when I am submitting my form data?
error image has been attached
you should define function with function keyword… you just type below code inside script tag
CODE
function input(){
var inp = document.getElementById(‘input’).value;
analogWrite(0,inp);
}
thanks its working but after i submit my result the sound starts coming from buzzer but the same error page came again although sound was coming continuously throughout. then i have to start the view device page once again and then press off button.can it be solved?please help.
Make sure you enabled API key…
yeah i have enabled thats why its working for the first time
<!doctype html>
<html>
<head>
<title>Control Buzzer</title>
<script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
<script>
setKey('{{ApiKey}}','{{Name}}');
</script>
</head>
<body bgcolor="slateblue">
<center>
<button id="on" onclick="digitalWrite(0,'HIGH');">ON</button>
<button id="off" onclick="digitalWrite(0,'LOW');">OFF</button>
</center>
</body>
</html>
Try With this code…