javascript file in iphone...?
<p>I want to make a calculator..all the calculation code is given in javascript file..I don't want to do all the calculation again..?can there is any method that can directly call the methods given in javascript  file...?</p>

<p>sample of javascript file is here---</p>

<pre><code>function reset() {
D6080One.resetAll();
D6080Multi.resetAll();
IsoOne.resetAll();
IsoMulti.resetAll();
}


/**
 * D6080 Extended One pump
 */

function D6080One() {}

D6080One.fillEquipment = function() {
    document.getElementById("d6080one-equip").options.length = 0;
    for(var i = 0; i &lt; nfpa.length; ++i) {
        if(nfpa[i][0] == document.getElementById("d6080one-manu")[document.getElementById("d6080one-manu").selectedIndex].value) {
            document.getElementById("d6080one-equip").options[document.getElementById("d6080one-equip").options.length] = new Option(nfpa[i][1], nfpa[i][1]);
        }
    }
    document.getElementById("d6080one-equip").selectedIndex = 0;
}

D6080One.resetAll = function() {
    document.getElementById("d6080one").reset();
    D6080One.fillEquipment();
}

D6080One.resetResults = function() {
    document.getElementById("d6080one-suv").value = "";
    document.getElementById("d6080one-sut").value = "";
    document.getElementById("d6080one-maxov").value = "";
    document.getElementById("d6080one-minot").value = "";
    document.getElementById("d6080one-hov").value = "";
    document.getElementById("d6080one-lot").value = "";
    document.getElementById("d6080one-lov").value = "";
    document.getElementById("d6080one-hopt").value = "";
    document.getElementById("d6080one-minov").value = "";
    document.getElementById("d6080one-maxot").value = "";
    document.getElementById("d6080one-grade").value = "";
}

D6080One.solve = function() {
    var a, b, l1, l2, l3, lt, ltGrade, r, record, result, s, t750;

    document.getElementById("d6080one-hot").value = document.getElementById("d6080one-hot").value.replace(/,/, ".");
    document.getElementById("d6080one-lst").value = document.getElementById("d6080one-lst").value.replace(/,/, ".");

    if(document.getElementById("d6080one-hot").value == "" || isNaN(document.getElementById("d6080one-hot").value)) {
        alert("Please Choose a Highest Operating Temperature!");
        document.getElementById("d6080one-hot").value = "";
        document.getElementById("d6080one-hot").focus();
        return false;
    }
    if(document.getElementById("d6080one-lst").value == "" || isNaN(document.getElementById("d6080one-lst").value)) {
        alert("Please Choose a Lowest Start-Up Temperature!");
        document.getElementById("d6080one-lst").value = "";
        document.getElementById("d6080one-lst").focus();
        return false;
    }

    for(var i = 0; i &lt; nfpa.length; ++i) {
        if(nfpa[i][0] == document.getElementById("d6080one-manu")[document.getElementById("d6080one-manu").selectedIndex].value
                &amp;&amp; nfpa[i][1] == document.getElementById("d6080one-equip")[document.getElementById("d6080one-equip").selectedIndex].value) {
            record = nfpa[i];
            break;
        }
    }
</code></pre>
