asked on November 2, 2016
I have a process where I jumble an SSN to create a unique ID. I use ID in this process to initiate a lookup. I'm using JavaScript code that is meant to see if the entry is this unique ID( and Ignore), is an SSN(Jumble into an APPID and replace the original entry, retriggering the lookup) or if it is neither(No match). The problem is that the java populations are not recognized as form input in a way that will trigger the lookup. Ideally i can trigger the lookup in the JavaScript code after the field has been repopulated, but...
The carrier field is added just to show what APPID previously was. Any suggestions would be appreciated.
$(document).ready(function() { $(".Text1 input").change(function(){ var Ref1 = "EH"; var Text1 = $('.Text1 input').val(); var Prefix = Text1.substring(0,2); var SSNH1 = Text1.substring(3,4); var SSNH2 = Text1.substring(6,7); var SSNH3 = "-"; var APPID = "EH" +Text1.substring(8,9) +Text1.substring(9,10)+ Text1.substring(7,8) +Text1.substring(0,1)+ Text1.substring(1,2)+ Text1.substring(4,5)+ Text1.substring(10,11)+ Text1.substring(5,6) +Text1.substring(2,3); //alert("Ref1:" +Ref1); //alert("Text1:" +Text1); //alert("Prefix:" +Prefix); //alert("H1:" +SSNH1); //alert("H2:" +SSNH2); //alert("H3:" +SSNH3); //alert("APPID:" +APPID); if(Ref1 == Prefix) { alert("Good APPID"); } else if(SSNH1 == SSNH2 && SSNH1 == SSNH3) //good ssn { alert("SSN Converted to" +APPID); //set #q1 to APPID variable $('.Text1 input').val(APPID); $('.Text3 input').val(Text1); } else { alert("ERROR! Enter APPID or SSN(###-##-####)."); //set #q1 to "" $('.Text1 input').val(""); } }); });
0
0