Question subject: need help with java script in a pdf
Posted: Thu Dec 16, 2010 11:43 pm
Joined: Thu Dec 16, 2010 11:29 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
I have two combo boxes on a pdf form the first controls 4 text boxes and puts the correct information into the the text boxes based on the combo box choice.the first combobox works perfect. I duplicated the code but choose a different names for the script on the second combo box. The second combo box work but nno data is shown when i select a choice for the second combo box but the first one works flawlessly.
Here is the code for the second combobox
Code:
function SetFieldVal() { var step2={ Phil_Tremper:{Desaddr:"PO Box 515",DesTelephone:"845-744-4437",DesCity:"PineBush NY",Deszip:"12566"}, Robert_Dykeman:{Desaddr:"1865 Rt. 23",DesTelephone:"518-325-8888",DesCity:"Craryville NY",Deszip:"12521"}, Peter_Kowal:{Desaddr:"4 Court Helaine",DesTelephone:"845-856-1402",DesCity:" Port Jervis NY",Deszip:"12521"}}; function SetFieldVal(cstep2) { this.getField("Desaddr").value=step2[cstep2].Desaddr; this.getField("DesTelephone").value=step2[cstep2].DesTelephone; this.getField("DesCity").value=step2[cstep2].DesCity; this.getField("Deszip").value=step2[cstep2].Deszip; }
} The combo box name is step2
there is one other piece of code in the keystroke section of the combo box