Hey! My dad's switching his site over to Square Space from Homestead. He has a calculator for his website (currently hosted on Homestead) to find the price of a product according to the dimensions of the product. However, the same code he's using in Homestead is NOT working in Square Space. I'm not very good with code and I don't know whether it has something to do with languages or what. Any help would be appreciate! Thanks!
Here's the website with the calculator on it: http://www.eastcoasttinning.com/pricing.html
(Also, if there's a different way of executing this that's better than this, please let me know. Thanks again!)
Here's the code he's using:
<p><font face="Georgia"><font color="#000000" size="2"><strong>Cost Calculator</strong><br/>Enter diameter and height of pan to the <u>nearest</u> inch. </font></font></p> <table style="WIDTH: 200px; HEIGHT: 80px" cellspacing="0" cellpadding="0" width="200" summary="" border="0"> <tbody> <tr> <td width="75"><font face=" Georgia " size="2"><font color="#000000">Diameter:</font></font></td> <td> <input onkeypress="javascript:findcost();" id="diameter" size="3" /> inches </td> </tr> <tr> <td><font face="Georgia " size="2"><font color="#000000">Height:</font></font></td> <td> <input onkeypress="javascript:findcost();" id="height" size="3" width="25" /> inches</td> </tr> <tr> <td><font face=" Georgia " size="2"><font color="#000000">Price $:</font></font></td> <td id="Price"><font face=" Georgia " size="2"><font color="#000000">    ---</font></font></td> </tr> </tbody> </table> <script language="Javascript"> function findcost() { var dia = document.getElementById("diameter").value; var height = document.getElementById ("height").value; if( IsNumeric(dia) && IsNumeric(height) ) {setTimeout("displaycost()",60);} else { document.getElementById("Price").innerHTML = '<font size="2" face=" Georgia "><font color="#000000">' + "    ---" + "</font></font>" } } function displaycost(dia,height) { var dia = document.getElementById("diameter").value; var height = document.getElementById("height").value; if( IsNumeric(dia) && IsNumeric(height) && (height!="") && dia!="") { dia = parseInt(dia); height = parseInt(height); // alert(dia+height); document.getElementById("Price").innerHTML = '<font size="2" face="Georgia"><font color="#00000">    $' + 5*(dia + (2*height)) + "</font></font>" } else { document.getElementById("Price").innerHTML = '<font size="2" face="Georgia"><font color="#000000">' + "    --- " + "</font></font>" } } function IsNumeric(sText) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false;} } return IsNumber; }