Does anyone know of a good script example to create a data drill down using dropdown list. I have tried using the one shown in the developing forms training manual and it doesn't seem to work. I would appreciate any help in this matter. Thankyou.
Views
Replies
Total Likes
I don't know of any, but how about posting your sample and we'll try to get it working.
Views
Replies
Total Likes
Kevin,
Thank you for taking a look at my problem. I hope I made as simple of an
example as possible. I am a graphic designer converting into the Java
script world. Attached is a word doc with a screen shot and a pdf with
the script I used in LiveCycle designer. You can laugh if you want. I am
truly a novice.
Views
Replies
Total Likes
Nikki, I don't see any attachments to your post. Try attaching the files again.
Views
Replies
Total Likes
This is a PDF of the scenario I am looking for. Hope this inserted PDF works. Thank you.
Views
Replies
Total Likes
Nikki, this is not so bad, you have a few errors (many just typos). I think I've got them all:
1. In BakedGoods:change event you want to pass in the second dropdown to be filled in. You should have:
jsBakeDropDowns.getGoods(xfa,
Type);
2. In function getGoods you have several syntax errors:
xfa.host.messageBox(selectFlavor, "selected Flavor"); ->
xfa.host.messageBox(selectedFlavor, "selected Flavor");
for(var i = 0; i <; YummyArray.length; i++) ->
for(var i = 0; i < YummyArray.length; i++)
for(var j = 1; j <; YummyArray[i].lenght; j++) ->
for(var j = 1; j < YummyArray[i].length; j++)
3. YummyArray definition, you need a space between 'new' and 'Array(2)' for the first parameter.
Try making those changes and repost if you still have issues. Posting the link to the form worked out best. Once you get it working you'll probably want to think about pulling the data from a database or file rather than hard-coding it.
Thank you so much! I will try this. =)
Views
Replies
Total Likes
Hi,
I am trying to create a fillable PDF to do the same thing. Where the second drop down list depends on the choice in the first drop down. Did you get it to work? Can you post the PDF of it as a reply?
I looked at the PDF file you posted but I haven't used script before and wasn't sure where you were typing the script.
Thanks.
Views
Replies
Total Likes
Hi MIZUN03,
Sorry for delayed response I was in Scotland on vacation. I actually know an easier way than was described in earlier postings. Attached is a PDF of a screen shot of how this works. Attached to the first drop down is a change event which is scripted above.
var
list
var
val = xfa.event.newText
if
(val == "Cookies") {
list
= Cookies;
}
else
if (val == "Pies"){list
= Pies;
}
//This code will clear out and then populate the Flavors drop down list
form1.Drilldown.Flavors.rawValue
= "";
form1.Drilldown.Flavors.clearItems() ;
var
arrayItems = eval(list.value);
for
(var i=0; i < arrayItems.length; i++) {
form1.Drilldown.Flavors.addItem(arrayItems[i]);
}
Also in the Object - Field tab you will need to list your choices for this drop down (in this case Cookies and Pies). Then you go to properties - Variables and add the 2 arrays that will populate based on your selection. I also have attached the screen shot for this. Let me know if this does not work.
Views
Replies
Total Likes
Hi Novice_Nikki,
Thanks for your help but unfortunately I still can't get it to work. I attached what I have. But it is probably easier if you post as a reply attachment that sample PDF you made with cookies and pies. Or you can send it to my email bugaboo0036 at hotmail.com.
Thanks.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies