PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/
__________________________________________________________________
Hi, Ken
OH, Syntax Error Overload!!! ;-)
Without addressing the functionality of this script, here's my clean up:
var fieldOne = "sponsor.";
for (fieldOne = 0; i < oFromSelect.options.length; i++) {
if (oFromSelect.options[i].selected) {
if (dmm1.value == "") dmm1 = selection;
else if (dmm1.value != "" && dmm2.value == "") dmm2 = selection;
else if (dmm1.value != "" && dmm2.value != "" && dmm3.value == "") dmm3
= selection;
else app.alert("All fields are full");
}
}
Now some things I see in the script that may cause problems...
1.) you're using "fieldOne" twice in different contexts (first you say
it = "sponsor.", then in your loop you use it as your incrementing
value)
2.) you may have to define the variable "selection"
3.) you probably mean dmm1.value = selection; (not dmm1 = selection;)
4.) you'll probably have to "get" the text boxes using
this.getField('dmmX');
I hope that helps.
Mark
-----Original Message-----
From: kc [mailto:[EMAIL PROTECTED]
Sent: March 30, 2004 1:20 PM
To: [EMAIL PROTECTED]
Subject: [PDF-Forms] Make Multiple Selectios From List, Then Display in
Three Text Fields
PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/
__________________________________________________________________
Hi All
I am hoping someone can review the script at the bottom of this message
and help me get it working. My form has a list box field named sponsor
that has 83 values in it. Users will go to this list box, and control
click and choose up to three of the values from the list. I attached the
script below to that list box to run "on blur"
What I want the script to do is see whatever values were selected (from
1 to 3 values), take those values, and always disregard the default
value of "Make a Selection", and display them in three text boxes named
dmm1, dmm2 and dmm3
Ted Daniels gave me a start, but I think I have just destroyed his good
intentions with my scripting. Can someone help me get this working?
Thanks in advance for any help you can offer
Kenn
var fieldOne = "sponsor.";
for (var fieldOne = 0; i < oFromSelect.options.length; i++) { if (
oFromSelect.options[i].selected == true ) { }
if (dmm1.value== "")
{
dmm1 = selection
}
else if (dmm1.value !== "" && dmm2.value == "")
{
dmm2 = selection
}
else if (dmm1.value !== "" && dmm2.value !== "" && dmm3.value == "")
{
dmm3=selection
}
else
{
alert("All fields are full");
}
}
To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html
To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html