on 08-20-2009 6:30 AM
HI All,
I have a requirement where i need to change the Image set in Background based on some other field input.
I thinki have to use Image Field with some scripting(FormCalc).
Please provide valuable inputs how to achieve the same.
Saurav,
Let's assume you have two image elements in your form named as StaticImage1 & StaticImage2. Use Embed Image Data for both in Object palette.
Now you need an ImageField (ImageField1) to display the Image based on some Textfield input say TextField1.
In exit event of TextField1 write the following code in JavaScript
if(textField1.rawValue == "1") // Write your condition here
{
var image = StaticImage1.value.image.value;
ImageField1.rawValue = image;
}
else
{
var image = StaticImage2.value.image.value;
ImageField1.rawValue = image;
}
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do I need not fill the URL of ImageField1 at design time and what about Embed image Data property of ImageField1?
The script you have provided is not working for me.
var image = StaticImage1.value.image.value; StaticImage1.value is ok but StaticImage1.value.image.value is not coming for me.
Could you provide the same in FormCalc ?
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.