Loop through image objects to make visible

Avatar

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
DKinsley
Level 3

10-12-2015

I have two master pages (Page1 and Page2). Both have two image objects (TFCLogo and YFLogo) set to be invisible at the top of each master page. When the user selects one of the two companies from a drop-down list object (CoPerformingAudit), I want the corresponding logo for that company to change to visible on all pages and any new pages that are dynamically created.

I think I need a loop script in the layout:ready event but I have not been able to figure out the script. The reason I am using image objects and not image field objects is because I do not want the image data to export when merging the form data to a spreadsheet.

Currently only one logo appears on the top of the first instance of Page1 and one on the first instance of Page2. Can anyone help me with this script?

Capture.GIF

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

10-12-2015

Hi,

I've a sample that updates an image on a master page based on a radio button selection.  The code is in the calculate event of the Logo subform on the master page.

Might be a starting point

https://sites.google.com/site/livecycledesignercookbooks/home/DynamicMasterPageImage.pdf?attredirect...

Regards

Bruce

Answers (1)

Answers (1)

Avatar

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
DKinsley
Level 3

11-12-2015

Your suggestion seems to have solved my issue. I modified your script from radio buttons to a dropdown list
and added a blank image to both master pages. I added both logos to both master pages set to invisible. I added your script for both master pages in the calculate event. Now when the user selects one of the company names from the dropdown list, that corresponding logo appears all all pages regardless if they are created using master page 1 or 2. Also, the image XML data does not export to my spreadsheet since I am using image objects instead of image field objects. Seems to work great!

Thank you, thank you, thank you!