How to load images and fragments dynamically in LiveCycle Designer forms?
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-12T15:01:09Z
Indexed on
2010/04/12
15:03 UTC
Read the original article
Hit count: 253
Hi there.
I've created a couple of shared templates (.xdp) which will be shared among several clients. Obviously, each client has their own logo and I'd like to set the logo upon form generation.
I've managed to change the logo dynamically although I'm not sure if my approach is good.
In the xml datasource I've got this element:
<ClientID>SomeNumber</ClientId>
In the form itself I set the image href with this javascript code:
SomeHiddenTextField::calculate HeaderLogo.value.image.href = $record.ClientID + "_logo.jpg";
I've got the logos stored on the server in the same folder as the shared templates.
Is this an alright approach to load logos dynamically?
I've been trying to achieve the same dynamic behaviour with each client's footer fragment, but I have been unable to figure out how to load these on demand. I could make each footer fragment in to an image but I'd like to avoid it if possible.
© Stack Overflow or respective owner