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?
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
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!