on 05-12-2011 3:51 PM
Hi All,
Based on the drop down list i need to to display relevant icon on the form .For that I guess I need to do Scripting ,do any body have idea on how to display the icon based on drop down list.
The form is Interactive form.
Hi,
You can do it by using script(FormCalc or JavaScript):
Create icons using image UI element, place these images on a location in the layout. and hide all of them.
Now on change event of dropdown write the following code:
if ($.rawvalue eq <value1>)
then
icon1.presence = "visible"
icon2.presence = "hidden"
icon3.presence = "hidden"
elseif ($.rawvalue eq <value2>)
then
icon1.presence = "hidden"
icon2.presence = "visible"
icon3.presence = "hidden"
.
.
.
.
so on...
This is a sample code. varify the syntex from Adobe livecycle designer help before using it. Check the help about presence property of UI Elements.
Regards,
Vaibhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vaibhav,
Thanks for the info.
I tried this scripting but failed.
Do you have any code which similarly talk this fucntionality,I tried in so many places but faile dto get the one I needed.
Let say Drop down has two fields
text 1,2
then i need to display icon for 1 in red and 2 in green the field would be image .
Now can you simulate this and let me know if you have any similar code for this.
Thanks,
Amit
Hi Mate,
make all the icons
On the exit event of the drop down have this below code.
if(this.rawValue == 1){
form1....icon1.presence = "visible"; // have the icon1&2 absolute paths
form1....icon2.presence = "hidden";
}
else{
form1....icon1.presence = "hidden";
form1....icon2.presence = "visible";
}
This should solve your problem,
Cheers,
Sai
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.