即使代码工作正常,Javascript异常弹出

时间:2013-06-08 15:11:00

标签: javascript joomla breezingforms

我已经提交了一份费用提交表格并使用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

0 个答案:

没有答案