JS help

Out of context: Reply #1

  • Started
  • Last post
  • 13 Responses
  • i_monk0

    Here's what I've cobbled together so far, but this is really outside my area... I could play with this for weeks and not figure out what's missing:

    function pv(rate, per, nper, pay, fv)
    {
    var rate=this.getField("Rate");
    var per=this.getField("Years");
    var nper=this.getField("Shortfall");
    var pay=0;
    var fv=1;
    }
    var amount = this.getField("Amount");
    var choice = this.getField("Choice1");
    if (choice.value=="1")
    {
    amount.valueAsString = nper/rate;
    }
    else
    {
    amount.valueAsString = pv(rate,per,nper,pay,fv);
    }

    • I can't tell if it's doing what I want, or figure out how to make it show the results.i_monk

View thread