James
 
Thanks for the help. I did give it a try. I'm not sure what Acrobat is telling me, but it says.
 
TypeError: f.getitemAt is not a function
TypeError: f1.options has no properties
 
Maybe it doesn't know what the 80+ values are in the list box...
 
For now I am going to repeat the list box three times and limit the user to selecting only one choice from each of the three list boxes. That way I will get the up to three choices from the list. Not as elegant as doing it with _javascript_, but it will get the form in the users hands and buy me some time to figure out how to get the script to work.
 
Thanks Again
 
 
Kenn
 
----- Original Message -----

From: James Plante
Sent: Thursday, April 01, 2004 1:21 PM
Subject: Re: [PDF-Forms] Make Multiple Selectios From List, Then Display in Three Text Fields

This might work. My changes are in red.

On Mar 31, 2004, at 11:15 AM, kc wrote:


"ReferenceError: i is not defined."
f1 = this.getField("sponsor");
f2 = this.getField("dmm1").value;
f3 = this.getField("dmm2").value;
f4 = this.getField("dmm3").value;

var fieldOne = "sponsor."; //why?

for (var i = 0; i < f1.options.length; i++) { // eliminate the "o" before f1. You had "of1," and that isn't defined, either.
//this loop will make f1.options run from f1.options[0] to f1.options[length of options]
if (f1.options[i].selected) { // don't know if this is correct or not.

if (f2.value == "") f2.value = f1.options[i];

else if (f2.value != "" && f3.value == "") f3.value = f1.options[i];

else if (f2.value != "" && f3.value != "" && f4.value == "") f4.value
= f1.options[i];

else app.alert("All fields are full");
}
}



Jim Plante
<[EMAIL PROTECTED]>


Reply via email to