Highlighted

Drop List-Visible/Invisible Drop List

Avatar

Guest

01-01-2009

Here is my senario.

I have a drop-down list with two items:ITEM_A,ITEM_B



Also I have two others Drop-down lists:ListItem_A,ListItem_B

The presence for these two drop list is invisible.



This that I like to achive is when a user select ITEM_A for example,Drop list(ListItem_A)to become visible or if they select ITEM_B for example,Drop list(ListItem_B)to become visible.



Thank and HAPPY NEW YEAR

Replies

Highlighted

pguerett

05-01-2009

You can only make the entire List visible, invisible ....you cannot make individual list items visible, invisible. You can automatically select the item from the list you want beased on sopmething else in the form though.
Highlighted

Avatar

Guest

07-01-2009

Dear Paul,



If I interpret your answer correctly, then what I'd like to do should be possible:

Only if a certain item on "DropListA" is selected, "DropListB" should be made visible. So an item in DropListA should Trigger the event to make DropListB visible. With what code could I accomplish such thing?



Thank you,



Olivio
Highlighted

Thomas_McConnac

07-01-2009

In the change event of the first drop down list:



if (this.rawValue == "CaseToMakeBAppear")

{

DropListB.presence = "visible";

}

else

{

DropListB.presence = "hidden";

}
Highlighted

Avatar

Guest

07-01-2009

Dear Thomas, Thank you very much for your help, this problem works now. As you can tell, I have no idea of JavaScript. What do I have to add to the code for the following:



My drop Down List (DD0) has 3 options (Values 0,1,2) If I select 0 (which is the Default value), it should leave the 2 other DD-Lists (DD1 and DD2) invisible.

If I select 1, it should only show DD1 and if I select 2, it should only show DD2.



Here is the code that I entered under the change event of the first list (DD0), but it doesn't work:



if (form1.Main.Vessel.Table1.Row2.DD0.rawValue == 1)

{

form1.Main.Vessel.Table1.Row2.DD1.presence = "visible";

}

else if (form1.Main.Vessel.Table1.Row2.DD0.rawValue == 2)

{

form1.Main.Vessel.Table1.Row2.DD2.presence = "visible";

}

else

{

form1.Main.Vessel.Table1.Row2.DD1.presence = "hidden"; form1.Main.Vessel.Table1.Row2.DD2.presence = "hidden";

}



What do I need to change? And Thank you very much for the quick help! If you'd like to, I can also send you the form.
Highlighted

Avatar

Guest

07-01-2009

Nevermind, I worked it out.



I put the following code under the "exitEvent" and not "changeEvent" and now it works.



if (form1.Main.Vessel.Table1.Row2.assess_1.rawValue == 0)

{

form1.Main.Vessel.Table1.Row2.Artefact_1.presence = "visible";

form1.Main.Vessel.Table1.Row2.Stent_1.presence = "invisible";

}

if (form1.Main.Vessel.Table1.Row2.assess_1.rawValue == 2)

{

form1.Main.Vessel.Table1.Row2.Stent_1.presence = "visible";

form1.Main.Vessel.Table1.Row2.Artefact_1.presence = "invisible";

}

if (form1.Main.Vessel.Table1.Row2.assess_1.rawValue == 1)

{

form1.Main.Vessel.Table1.Row2.Stent_1.presence = "invisible";

form1.Main.Vessel.Table1.Row2.Artefact_1.presence = "invisible";

}



Thank you anyway