Can someone help me with a problem? I wrote this script but every - TopicsExpress



          

Can someone help me with a problem? I wrote this script but every time I try it the output is slightly more then twice what it should be. I am pretty sure it is a problem with the order of operations but I have a hard time with math so I am not sure. Any help or suggestions would be great! This is the page where I have it as well as some information about why I wrote this. livingstonjewelers/ovals.html function calculate() { var a = document.frmOne.txtFirstNumber.value; // input string a var b = document.frmOne.txtSecondNumber.value; // input string b var a = Number(a); // numerical value of a var b = Number(b); // numerical value of b var bezel = (2*a)*(2+1.1415926535*(Math.pow((b/a),1.456))); // this should be the bezel length document.frmOne.txtThirdNumber.value = bezel; // Output the result: }
Posted on: Thu, 13 Nov 2014 22:34:49 +0000

Trending Topics



Recently Viewed Topics




© 2015