|
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
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/color>; f3 =
this.getField("dmm2").value/color>; f4 =
this.getField("dmm3").value/color>;
var
fieldOne = "sponsor.";
//why?/color>
for (var i /color>= 0; i <
f1.options.length; i++) { // eliminate the
"o" before f1. You had "of1," and that isn't defined,
either./color>
//this loop
will make f1.options run from f1.options[0] to f1.options[length of options]/color>
if (f1.options[i].selected) { //
don't know if this is correct or not./color>
if (f2/color>.value == "") f2/color>.value = f1.options[i];/color>
else if (f2/color>.value != "" && f3/color>.value == "") f3/color>.value/color>
= f1.options[i]/color>;
else if (f2/color>.value != "" && f3/color>.value != "" && f4/color>.value == "") f4/color>.value/color> =
f1.options[i]/color>;
else
app.alert("All fields are full"); } }
Jim
Plante <[EMAIL PROTECTED]>
|