I wanted to ask a general question and share my experience using Google Sites and Javascript. Hopefully it will save others the time and grief.
Javascript from https://stackoverflow.com/a/14781022/6088382 was used and inserted into an HTML Box on my Google Sites test page https://sites.google.com/site/woogietest/.
<script>
function calcul(){
var x = parseFloat(document.getElementById("value1").value);
var y = parseFloat(document.getElementById("value2").value);
document.getElementById("answer").innerHTML=x+y;
}
</script>
<form action="" id="nothing">
<input type="text" id="value1">
<input type="text" id="value2">
<input type="button" value="Calculate" id="but" onclick="calcul()" />
</form>
<p id="answer"></p>
Using Chrome 50.0.2661.37 beta-m (64-bit) (conditions tested: browsing normally, disabling extensions, and in incognito mode) when I enter two numbers and press Calculate nothing happens.
Using Firefox 45.0.1 when I enter two numbers and press Calculate the code is executed properly.
The code works using IE11 too!
What am I doing wrong on Google Sites in Chrome? Should I avoid Chrome for Google Sites/Javascript development?