Anyone know what this error message means?

rose_brose_b Manchester, UKCommunity Member - Trial User Qubie ✭

Anyone know what this error message means?

Hi everyone,

My team has put together some JS to create an additional constant sum total on a matrix table. It works perfectly, but when we go to submit the data on the preview it comes up with the below error:

The code we're using is below - it also includes functions to replace zeros with blank space and widens the input boxes:

/Place your JavaScript here to run when the page loads/
var a = 0;
var b = 0;

while (a<6){
while (b<9){
if(this.getChoiceValue(a,b) == 0) {
b = 0;

var inputWidth = "75px";
var q = jQuery("#"+this.questionId);
q.find('Input').css("width", inputWidth);
q.find('.SumInput').css("width", inputWidth);
q.find('.SumTotal').css("width", inputWidth);
q.find('.InputText').css("width", inputWidth);


/Place your JavaScript here to run when the page is fully displayed/

this.questionclick = function(event,element){

var i =0; /Setting column number for loopage/

while (i<9){
var a = parseInt(this.getChoiceValue(1,i),10);
var b = parseInt(this.getChoiceValue(2,i),10);
var c = parseInt(this.getChoiceValue(3,i),10);
var d = parseInt(this.getChoiceValue(4,i),10);
var e = parseInt(this.getChoiceValue(5,i),10);

if(isNaN(a)){ /*check if div by 0*/
    a= 0;
if(isNaN(b)){ /*check if div by 0*/
    b= 0;
    if(isNaN(c)){ /*check if div by 0*/
    c= 0;
    if(isNaN(d)){ /*check if div by 0*/
    d= 0;
    if(isNaN(e)){ /*check if div by 0*/
    e= 0;
    var x = a+b+c+d+e ;

this.setChoiceValue (6,i,x);

    /*Increase column number*/



/Place your JavaScript here to run when the page is unloaded/


Any ideas on the error??



Best Answer

Sign In to Comment