Trouble getting commas in numbers.
I am very new to jQuery and I was wondering if anyone can help me out with an issue I have adding commas to an outputted field. I checked the web and used many examples but for the life of me I can not get it to work.
My script is a calculator that calculates footage. The calculations work perfectly and the outputted number shows up and is corrected, but has no commas for large numbers. The script that I made has three parts to it, the jquery code that does the calculations, the input fields and the output field. The jQuery code is below.
Can anyone help me out with this, I would be very great full. Thank you in advance.
- function getFootage(){weight1=document.getElementById("weight1").value;width1=
- document.getElementById("width1").value;gauge1=document.getElementById("gauge1").
- value;density1=document.getElementById("density1").value;document.getElementById
- ("totalFootage").innerHTML=(weight1/width1/gauge1/density1/12).toFixed(0)}