Uncaught TypeError: Cannot set property 'innerHTML' of null & Some other.

Uncaught TypeError: Cannot set property 'innerHTML' of null & Some other.

Hi There, 

I was hopping you could help me. 

I'm learning Jquery and Java scripts, I have wrote little script which is working fine on local machine, but when I put it on live website it won't work. I'm using business catalyst as my live site.

When I entered my code. It didnt work - I saw this error via inspect element. : " Uncaught TypeError: Cannot set property 'innerHTML' of null " > Onclick  and those two :  Uncaught SyntaxError: Unexpected end of input



Uncaught ReferenceError: calculate is not defined

  1. <script language="javascript">

  2. $ (document) .ready(function() {

  3. });
  4. function calculate() {
  5. A = document.FormOne.One.value
  6. B = document.FormOne.Two.value
  7. C = (A*B)
  8. document.getElementById("display").innerHTML = C + ('M&sup2');
  9. }

  10. </script>
  11. </head>

  12. <body>
  13. <form name="FormOne">
  14. Width:  <input class="num" type="number" name="One"  size="5" value="" /> 
  15. Length:  <input class="num" type="number" name="Two" size="5" value="" />
  16. </form>

  17. <input class="CalBut" type="button" name="button" value="Calculate" onclick="calculate()" /> 

  18. <div id="display"> </div>

  19. </body>

</html>

Any idea what's wrong?  

I do have jquery installed on the site - I have even linked it to the google one.



just that you can have look

Thanks 

Jiri