0

我已经制作了费用提交表格并使用 Javascript 来计算已支付的金额和到期金额,并根据结果更改状态。这是我的代码:

function ff_Student_Form_init()
{
  setInterval("AdmissionCalc()", 500)
}

function AdmissionCalc(){

ff_getElementByName('AdmissionFeeStatus').value='';
ff_getElementByName('AdmissionFeeBalance').value=Number(ff_getElementByName('AdmissionFee').value)-Number(ff_getElementByName('AdmissionFeePaid').value);

if(ff_getElementByName('AdmissionFee').value==0){
ff_getElementByName('AdmissionFeeStatus').value="Not Applicable";
}
if(ff_getElementByName('AdmissionFee').value>0){
if ((ff_getElementByName('AdmissionFee').value == ff_getElementByName('AdmissionFeeBalance').value)){

ff_getElementByName('AdmissionFeeStatus').value="Unpaid";
}
}
if(ff_getElementByName('AdmissionFee').value>0){
if ((ff_getElementByName('AdmissionFee').value != ff_getElementByName('AdmissionFeeBalance').value)){

ff_getElementByName('AdmissionFeeStatus').value="Instalments";
}
}
if(ff_getElementByName('AdmissionFee').value>0){
if ((ff_getElementByName('AdmissionFeeBalance').value == 0)){

ff_getElementByName('AdmissionFeeStatus').value="Paid";
}
}
 }

不幸的是,我收到了这个异常弹出窗口,但是脚本可以正常工作,有人可以帮忙。

*** EXCEPTION CAUGHT ***
PHP error level : E_NOTICE
PHP linenumber  : 7
Last known pos  : Before form custom piece code at line 1
Error message   : Undefined offset: 0

*** EXCEPTION CAUGHT ***
PHP error level : E_NOTICE
PHP linenumber  : 12
Last known pos  : Before form custom piece code at line 1
Error message   : Undefined offset: 0
4

0 回答 0