View Full Version : Java Ballistic Calculator.

01-12-2010, 10:01 PM
1) Describe Work Request (be as detailed as possible):

Looking for a java based Ballistic calculator for firearms.

This will go one my site. http://www.mogunowners.com

2) Payment methods you support (ie: Paypal, 2checkout etc):


01-13-2010, 01:25 AM
1. I believe you mean Javascript. Java is a programming language like C++. It's only use on websites is in Java applets (similar to embedding Flash objects). Aside from their names, they two languages have nothing to do with each other and are entirely separate/different. Javascript is what is used to make various interactive aspects of webpages.

2. I saw your other thread, but have been too busy to write/test something. If you don't need this very soon, I can try something. It actually made me think of an experimental way to code it that would be quite easy. I'll try to do it sometime soon. But of course if someone can do it in the next couple days, go ahead.

01-13-2010, 03:19 AM
Thank you kindly.

01-13-2010, 03:46 AM
Ok, I had a few minutes. Here is my idea, though I'm not sure it will work. Also, you'll need to supply the math formula to calculate.

There is probably a "better" more standard way to do this, but I find this approach interesting.

form fields:
<input type="text" name="val1" id="val1" onchange="val1set(this);">
<input type="text" name="val2" id="val2" onchange="val1set(this);">
<input type="button" value="calculate" name="calc" id="calc" onclick="valscalc(this);">

Javascript at the top in <script> tags like normal:

var val1 = '';
var val2 = '';
var calc = '';

function val1set(x) {
val1 = x;
if (calc!='') { calc.value = 'calculate'; }
function val2set(x) {
val2 = x;
function valscalc(x) {
if (isNaN(val1.value)||isNaN(val2.value)) { return alert('Please set numerical values first!'); }
calc = x;
calc.value = val1.value+val2.value; //SETUP REAL MATH HERE//