# How to get the associated popup menu?

I have threePopupMenu and they work in such a way that second PopupMenu value depends on the value selected by the first PopupMenu and third PopupMenu value depends on the second PopupMenu value being selected.

If first PopupMenu has two option a and b. Then second PopupMenu should have c,d,e if a is selected and f when b is selected.

And if c is selected from second PopupMenu then third PopupMenu should have g,h and so on. These options are imported from Excel files. I wanted this to be dynamic; if someone makes any change to this file, then it should work accordingly.

At the starting time, all three PopupMenu should show Popup1, Popup2, Popup3 as the name of PopupMenu and the selected value should be shown in its title name from White color and all PopupMenu background is black.

-
 As a general strategy, you could run a scheduled task each n seconds and test the file date there. – belisarius Oct 9 '12 at 12:07 Yes. And except If, is there any other way to associate all the three popupmenu – Jennifer Oct 9 '12 at 12:14 Would the following do what you want? menu2[a]=PopupMenu[x,{c,d,e}];menu2[b]=PopupMenu[x,{f}];{PopupMenu[Dynamic[y],{‌​a,b}],Dynamic[menu2[y]]} – celtschk Oct 9 '12 at 12:21

 PopupMenu[Dynamic[varA], {a, b}]

 I just noticed that you got the Populist badge. Nice going. :-) – Mr.Wizard♦ Oct 9 '12 at 20:47 @Mr.Wizard Thank you. :) – jVincent Oct 10 '12 at 16:21 @jVincent: How can I use ActionMenu with Switch if I have to assign some action also in second Popupmenu – Jennifer Oct 10 '12 at 17:26 @Jennifer Unless I am misunderstanding your question, you should be able to just switch out PopupMenu with ActionMenu. If you are having trouble, you could extend your question. – jVincent Oct 10 '12 at 17:54 @jVincent: I have edited. – Jennifer Oct 10 '12 at 18:18