Radio Button populated Combox-Combox populates TextBox
- July 6, 2021
- 2 replies
- 612 views
Hi Everyone. Thanks for your help in advance....
I am working on getting a Combox to change its values. That works. Now I am working on that Combox changing a TextBox based on an ARRAY of choices set when the Combox is set....
I am almost there...but the TextBox does not change until it loses its Focus....got me stumped.
I have attached my test form for convienence.
function SetArrayValues(cChoice) { //app.alert(PassToTextBox +" var PassToTextBox passed to SetArrayValues from Radio Button") // Place all prepopulation data into a single data structure //var Choice = PassToTextBox switch (PassToTextBox) { case "Choice1": var ArrayData = { C1Item1:{ statement: "ComboBox Choice1-Item One",}, C1Item2:{ statement: "ComboBox Choice1-Item Two",}, C1Item3 :{ statement: "ComboBox Choice1-Item Three",}, C1Item4:{ statement: "ComboBox Choice1-Item Four",} }; //this.getField("txChoiceMessage").value = ArrayData[cChoice].statement; break; case "Choice2": var ArrayData = { C2Item1:{ statement: "ComboBox Choice2-Item One",}, C2Item2:{ statement: "ComboBox Choice2-Item Two",}, C2Item3 :{ statement: "ComboBox Choice2-Item Three",}, C2Item4:{ statement: "ComboBox Choice2-Item Four",} }; break; //this.getField("txChoiceMessage").value = ArrayData[cChoice].statement; case "": //app.alert("array did not work!"); this.getField("txChoiceMessage").value = "array did not work!"; break; }; this.getField("txChoiceMessage").value = ArrayData[cChoice].statement; }
