Expand my Community achievements bar.

Dropdown list to change image field linked image?

Avatar

Level 1

Hello,

I am quite new in Designer but I have to complete a job and I don't find the solution.

I try to update on a form an image field using the value of a dropdown box and a "if" script.

I use linked images (not embedded ones) and try using a script calling the image Field. value. image. href  property.

The property is well updated as export to xml displays well the new href value but the image is not displayed as something was missing to activate it.

form1.#subform[0].ImageField1::calculate - (FormCalc, client)

if (UN_DropDownList == "3373") then ImageField1.value.image.href = ".\Images\UN3373.png"
endif

Rather simple (don't laugh at it) but it doesn't work.

I found solutions for embedded images via visible/hidden by dropdown list (not yet tested) as these ones. I give them below for reference (if some other users are interested)

http://forums.adobe.com/thread/683215

http://forums.adobe.com/message/2187604

http://acrobat.timhuff.net/?p=5

But not for linked images (path or URL). By the way, I found same problem descriptions in other forums but without any proposed solution.

As I should have quite a lot of images with frequent updates, it seems to me a better solutions...

Thanks in advance for you help.

Kind regards

Philippe

1 Reply

Avatar

Level 10

Hi Philippe,

Have a look at this blog, http://blogs.adobe.com/formfeed/2009/11/linked_vs_embedded_template_im.html, it turns out that both linked and embedded images are stored in the PDF but just in different ways. So updating the href at run time will have no effect.

If you are not in a possition to store all the images in the PDF at design time then you might have to look at setting up a webservice to access them on a server.

Good luck

Bruce