AnsweredAssumed Answered

Javascript issue in the form? Help!

Question asked by apoorva190 on Jun 24, 2015

Hi, I am trying to do a keyup function on a text box in Nintex Forms, the code below works on one form but not the other form - it is the same exact code and all the other keyup functions work on that form except this one. Any suggestions on what I am missing???

 

 

var arrayCompletionRc = []; var _allOperatorCodes=[];   NWF$(document).ready(function(){  try{ setDefaultValues(); setReadonlyControls(); //global variable   NWF$("#" + myCompletionOpStatus).change(function (){ if(NWF$("#" + myCompletionOpStatus + " option:selected").text() == "O") { NWF$("#" + myCompletionOpName).val("SHERIDAN PRODUCTION COMPANY LLC"); } else if(NWF$("#" + myCompletionOpStatus + " option:selected").text() !== "O" && NWF$("#" + myCompletionOpName).val() !== "") { NWF$("#" + myCompletionOpName).val(""); } });     var oracleDataClass= new SPAPI_OracleData('');   NWF$("#" + myCompletionOpName).keyup(function()  { var selectedVal = "";             var _autoCompleteText = (NWF$("#" + myCompletionOpName).val()).toUpperCase();              if (_autoCompleteText.length > 2)       {  NWF$("#" + myIsNewOperator).val("Yes");                                                var autocompleteVals = [];                 var xmlResponse = "";                            xmlResponse = oracleDataClass.AllOperators();                 autocompleteVals = getAllOperatorsInfo(xmlResponse);  var textbox = NWF$("#" + myCompletionOpName);  textbox.autocomplete({  source: autocompleteVals,  minLength: 3,  select: function(event, ui)   {  NWF$("#" + myCompletionOpName).val(ui.item.value);   selectedVal = (NWF$("#" + myCompletionOpName).val()).toUpperCase();                        }                  });       }          });  // populate Operators NWF$("#" + myCompletionOpName).focusout(function()  { debugger;       var _arr;             NWF$.each(_allOperatorCodes,function(index,value) {  _arr =[value];  if(_arr[0][0] == (NWF$("#" + myCompletionOpName).val()))   {   NWF$("#" + myOperatorPartyNo).val(_arr[0][1]);   }              }); });

Outcomes