Hello, I would greatly appreciate reply to the following question.
I have a combo box, based on the selection of this combo box a text field is auto populated. Now, what I want to do is when this text is auto populated there is another co-depended text field to be auto populated.
I am using the following code:
On my first text field:
Custom keystroke script:
if( event.willCommit )
{
if(event.value == " ")
this.resetForm(["results"]);
else
SetFieldValues(event.value);
}
And this javascript function:
{
// Place all prepopulation data into a single data structure
var DeptData = { "Within 1 week":{ results: "IIa"},
"Within 3 months":{ results: "IV"},
"Within 3 weeks" :{ results: "IIb"},
"Within 6 weeks":{ results: "III"}};
function SetFieldValues(cDeptName)
{
this.getField("results").value = DeptData[cDeptName].results;
}}
my e-mail is: [link=mailto:dbertanjoli [at] cw [dot] bc [dot] ca]dbertanjoli [at] cw [dot] bc [dot] ca[/link]
Many thanks,
Deb
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script