You are viewing limited content. For full access, please sign in.

Question

Question

Laserfiche Forms encountered an internal error

asked on March 11, 2015

I recently added more strings to my script but now need to change the CSS Class to one of my fields. I get the above error and this message in my application logs when I do so. 

Message: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property

I am not sure what I did wrong with the script but the error message seems to directly reference it in some way. Any help or advice is greatly appreciated!

 

 

CSS CODE

.cf-collection-block {display:inline-block; width:50%}
.cf-label {width:  130px!important;}
.cf-field {width:  100%!important; float:right;}
.Submit {display:none;}

Javascript:

// Submit Button Hiding mechanics
$(document).ready(function() {
  $('.checkbox').click(function () {
    
    if($('input[value="yes"]').is(':checked')) //edit the value here to use your own.
       {
       $('.Submit').show();
       }
    else {
      $('.Submit').hide();
    }
  });                  
});


// Concatenate Emp info with User info for authentication using button.
function updateSearch() {
      var str = $('.empID input').val() + '|' + $('.empSSN input').val() + '|' + $('.CurrUser input').val();
      //var str = document.getElementById("#q1002") + '|' + document.getElementById("#q1001") + '|' + document.getElementById("#q1000");

  	  $('.searchStr input').val(str);
      $('.empSSN').on('change', 'input', updateSearch);
      $('.empID').on('change','input', updateSearch);
  	  $('.searchStr input').trigger('change');
  	setTimeout(function() {prepopvalues();}, 3000); // Delay Radio Button Fill by 3 Sec
};


// Radio Button Population Mechanics
var debugStatus = false;

$(function() {
  $(document).ready(function() {
    createFieldLookupIndex();
  });
});

var fieldLookupIndex = {};
function createFieldLookupIndex() {
  for (var i = 0; i < window.jsonForm.fields.length; i++) {
    var sc = window.jsonForm.fields[i];
    fieldLookupIndex[sc.attributeNameMapped] = sc.fieldId;
  }
}

function tattleTale(a1, a2, a3) {
  if (debugStatus === true) {
    alert(a1 + ' ' + a2 + ' ' + a3)
  }
}


function prepopvalues() {
  
    fillRadioButtons(v_ctS01G01,ctS01G01,5);
    fillRadioButtons(v_ctS01G02,ctS01G02,5);
    fillRadioButtons(v_ctS01G03,ctS01G03,5);
    fillRadioButtons(v_ctS02G01,ctS02G01,5);
    fillRadioButtons(v_ctS02G02,ctS02G02,5);
    fillRadioButtons(v_ctS02G03,ctS02G03,5);
    fillRadioButtons(v_ctS03G01,ctS03G01,5);
    fillRadioButtons(v_ctS03G02,ctS03G02,5);
    fillRadioButtons(v_ctS04G01,ctS04G01,5);
    fillRadioButtons(v_ctS04G02,ctS04G02,5);
    fillRadioButtons(v_ctS04G03,ctS04G03,5);
    fillRadioButtons(v_ctS04G04,ctS04G04,5);
    fillRadioButtons(v_ctS04G05,ctS04G05,5);
    fillRadioButtons(v_ctS05G01,ctS05G01,5);
    fillRadioButtons(v_ctS05G02,ctS05G02,5);
    fillRadioButtons(v_ctS05G03,ctS05G03,5);
    fillRadioButtons(v_tutS01G01,tutS01G01,5);
    fillRadioButtons(v_tutS01G02,tutS01G02,5);
    fillRadioButtons(v_tutS01G03,tutS01G03,5);
    fillRadioButtons(v_tutS02G01,tutS02G01,5);
    fillRadioButtons(v_tutS02G02,tutS02G02,5);
    fillRadioButtons(v_tutS02G03,tutS02G03,5);
    fillRadioButtons(v_tutS03G01,tutS03G01,5);
    fillRadioButtons(v_tutS03G02,tutS03G02,5);
    fillRadioButtons(v_tutS04G01,tutS04G01,5);
    fillRadioButtons(v_tutS04G02,tutS04G02,5);
    fillRadioButtons(v_tutS04G03,tutS04G03,5);
    fillRadioButtons(v_tutS04G04,tutS04G04,5);
    fillRadioButtons(v_tutS04G05,tutS04G05,5);
    fillRadioButtons(v_tutS05G01,tutS05G01,5);
    fillRadioButtons(v_tutS05G02,tutS05G02,5);
    fillRadioButtons(v_tutS05G03,tutS05G03,5);
    fillRadioButtons(v_tsaS01G01,tsaS01G01,5);
    fillRadioButtons(v_tsaS01G02,tsaS01G02,5);
    fillRadioButtons(v_tsaS01G03,tsaS01G03,5);
    fillRadioButtons(v_tsaS02G01,tsaS02G01,5);
    fillRadioButtons(v_tsaS02G02,tsaS02G02,5);
    fillRadioButtons(v_tsaS02G03,tsaS02G03,5);
    fillRadioButtons(v_tsaS02G04,tsaS02G04,5);
    fillRadioButtons(v_tsaS03G01,tsaS03G01,5);
    fillRadioButtons(v_tsaS03G02,tsaS03G02,5);
    fillRadioButtons(v_tsaS04G01,tsaS04G01,5);
    fillRadioButtons(v_tsaS04G02,tsaS04G02,5);
    fillRadioButtons(v_tsaS04G03,tsaS04G03,5);
    fillRadioButtons(v_tsaS05G01,tsaS05G01,5);
    fillRadioButtons(v_tsaS05G02,tsaS05G02,5);
    fillRadioButtons(v_tsaS05G03,tsaS05G03,5);
    fillRadioButtons(v_libS01G01,libS01G01,5);
    fillRadioButtons(v_libS01G02,libS01G02,5);
    fillRadioButtons(v_libS01G03,libS01G03,5);
    fillRadioButtons(v_libS02G01,libS02G01,5);
    fillRadioButtons(v_libS02G02,libS02G02,5);
    fillRadioButtons(v_libS03G01,libS03G01,5);
    fillRadioButtons(v_libS03G02,libS03G02,5);
    fillRadioButtons(v_libS04G01,libS04G01,5);
    fillRadioButtons(v_libS04G02,libS04G02,5);
    fillRadioButtons(v_libS04G03,libS04G03,5);
    fillRadioButtons(v_libS04G04,libS04G04,5);
    fillRadioButtons(v_libS04G05,libS04G05,5);
    fillRadioButtons(v_libS05G01,libS05G01,5);
    fillRadioButtons(v_libS05G02,libS05G02,5);
    fillRadioButtons(v_psyS01G01,psyS01G01,5);
    fillRadioButtons(v_psyS01G02,psyS01G02,5);
    fillRadioButtons(v_psyS01G03,psyS01G03,5);
    fillRadioButtons(v_psyS02G01,psyS02G01,5);
    fillRadioButtons(v_psyS02G02,psyS02G02,5);
    fillRadioButtons(v_psyS03G01,psyS03G01,5);
    fillRadioButtons(v_psyS03G02,psyS03G02,5);
    fillRadioButtons(v_psyS04G01,psyS04G01,5);
    fillRadioButtons(v_psyS04G02,psyS04G02,5);
    fillRadioButtons(v_psyS05G01,psyS05G01,5);
    fillRadioButtons(v_psyS05G02,psyS05G02,5);
    fillRadioButtons(v_cnlS01G01,cnlS01G01,5);
    fillRadioButtons(v_cnlS01G02,cnlS01G02,5);
    fillRadioButtons(v_cnlS01G03,cnlS01G03,5);
    fillRadioButtons(v_cnlS02G01,cnlS02G01,5);
    fillRadioButtons(v_cnlS02G02,cnlS02G02,5);
    fillRadioButtons(v_cnlS02G03,cnlS02G03,5);
    fillRadioButtons(v_cnlS03G01,cnlS03G01,5);
    fillRadioButtons(v_cnlS03G02,cnlS03G02,5);
    fillRadioButtons(v_cnlS04G01,cnlS04G01,5);
    fillRadioButtons(v_cnlS04G02,cnlS04G02,5);
    fillRadioButtons(v_cnlS04G03,cnlS04G03,5);
    fillRadioButtons(v_cnlS04G04,cnlS04G04,5);
    fillRadioButtons(v_cnlS04G05,cnlS04G05,5);
    fillRadioButtons(v_cnlS05G01,cnlS05G01,5);
    fillRadioButtons(v_cnlS05G02,cnlS05G02,5);
    fillRadioButtons(v_cnlS05G03,cnlS05G03,5);
    fillRadioButtons(v_swS01G01,swS01G01,5);
    fillRadioButtons(v_swS01G02,swS01G02,5);
    fillRadioButtons(v_swS01G03,swS01G03,5);
    fillRadioButtons(v_swS02G01,swS02G01,5);
    fillRadioButtons(v_swS02G02,swS02G02,5);
    fillRadioButtons(v_swS02G03,swS02G03,5);
    fillRadioButtons(v_swS03G01,swS03G01,5);
    fillRadioButtons(v_swS03G02,swS03G02,5);
    fillRadioButtons(v_swS04G01,swS04G01,5);
    fillRadioButtons(v_swS04G02,swS04G02,5);
    fillRadioButtons(v_swS04G03,swS04G03,5);
    fillRadioButtons(v_swS04G04,swS04G04,5);
    fillRadioButtons(v_swS04G05,swS04G05,5);
    fillRadioButtons(v_swS05G01,swS05G01,5);
    fillRadioButtons(v_swS05G02,swS05G02,5);
    fillRadioButtons(v_swS05G03,swS05G03,5);
    fillRadioButtons(v_ifS01G01,ifS01G01,5);
    fillRadioButtons(v_ifS01G02,ifS01G02,5);
    fillRadioButtons(v_ifS01G03,ifS01G03,5);
    fillRadioButtons(v_ifS02G01,ifS02G01,5);
    fillRadioButtons(v_ifS02G02,ifS02G02,5);
    fillRadioButtons(v_ifS02G03,ifS02G03,5);
    fillRadioButtons(v_ifS02G04,ifS02G04,5);
    fillRadioButtons(v_ifS03G01,ifS03G01,5);
    fillRadioButtons(v_ifS03G02,ifS03G02,5);
    fillRadioButtons(v_ifS04G01,ifS04G01,5);
    fillRadioButtons(v_ifS04G02,ifS04G02,5);
    fillRadioButtons(v_ifS04G03,ifS04G03,5);
    fillRadioButtons(v_ifS05G01,ifS05G01,5);
    fillRadioButtons(v_ifS05G02,ifS05G02,5);
    fillRadioButtons(v_ifS05G03,ifS05G03,5);
    fillRadioButtons(v_S06a,S06a,2);
    fillRadioButtons(v_S06b,S06b,2);
    fillRadioButtons(v_S06c,S06c,2);
    fillRadioButtons(v_S06d,S06d,2);
    fillRadioButtons(v_S06e,S06e,2);
    fillRadioButtons(v_S06f,S06f,2);
    fillRadioButtons(v_S06g,S06g,2);
    fillRadioButtons(v_S06h,S06h,2);
    fillRadioButtons(v_S06i,S06i,2);
    fillRadioButtons(v_ctS05G02,ctS05G02,2);
    fillRadioButtons(v_gpStudyWork,gpStudyWork,2);
    fillRadioButtons(v_psyS05G02,psyS05G02,2);
    fillRadioButtons(v_S06recommendation,S06recommendation,7);
    fillRadioButtons(v_gpStudyAct,gpStudyAct,3);
};

function fillRadioButtons (inp, targ, numRadios, alertLabel) {
  var inputField = document.getElementById("Field" + fieldLookupIndex[inp]);
  var targFieldTxt = "Field" + fieldLookupIndex[targ];
  var value;
  if (inputField && isNaN(inputField.value) != true) {
    value = parseInt(inputField.value,10);
    tattleTale("fillRadioButtons IF " + alertLabel, value);
    var t = document.getElementById(targFieldTxt + '-' + (value-1) );
    if (t) {
      t.checked = true;
    } else {
      //alert(targ + ' ' + targFieldTxt + '-' + (value-1));
      //alert(targ + " is missing a value.");
    }
  } else {
    tattleTale("fillRadioButtons ELSE " + alertLabel, inp, inputField);
    for (var i = 0; i < numRadios; i++) {
      var t = document.getElementById(targFieldTxt + '-' + i);
      if (t) {
        t.checked = false;
      }
    }
  }
}

 

0 0

Replies

replied on March 12, 2015

I'm not sure if Laserfiche is using the UpdatePanel with the .NET 3.5 Framework in Forms, but if they are, this article may be able to resolve your issue.

http://support.microsoft.com/kb/981884

0 0
replied on March 18, 2015

I did try changing it to 134,217,728 (128 MB) and still no luck before I posted the question, should have mentioned that and that I was using Forms 9.1.1.  At the recommendation of my VAR we have upgraded to 9.2.1 Monday, form is still not working but for different reasons now.  I am going to post a new question this morning and attach all related files I think to see if someone more familiar with jquery and javascript can help.  You interested?  wink

0 0
replied on March 18, 2015

I'll look for your post and see if I can help.

0 0
replied on March 19, 2015

Thank you, but I think we found the problem, an attrib in the window.jsonForm.fields changed.

function createFieldLookupIndex() {
	for (var i = 0; i < window.jsonForm.fields.length; i++) {
	    var sc = window.jsonForm.fields[i];
	     //fieldLookupIndex[sc.attributeNameMapped] = sc.fieldId; (Forms 9.1 version)
		fieldLookupIndex[sc.memberName] = sc.fieldId;  // Forms 9.2.1 version)
	  }
}

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.