I know there are a lot of posts regarding this, but I've gone through them and I can't figure out why this doesn't work.
I'm trying to call a javascript function from an HTML button. However, it's not working. It keeps saying it can't find the function. I get a
Uncaught TypeError: guess is not a function
<body>
<script type="text/javascript">
function guess() {
alert("called");
}
</script>
<div>
<form name="Guess">
<div data-role="fieldcontain">
<label>Guess</label><br/>
<input type="text" id="guess" maxlength="1"/><br/>
<button data-action="bea" onclick="guess()" class="btn">
Guess
</button>
</div>
</form>
</div>
</body>