Advanced Search

Results 1 to 4 of 4

Thread: Java Ballistic Calculator.

  1. #1
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java Ballistic Calculator.

    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):

    paypal

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you kindly.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    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.

    Code:
    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//
    }
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •