Hello,
I have dynamic signatures to include in my document. In cases where some are missing, I have set up a data-broken-image attribute to display a default image.
Additionally, our client has requested that a dealership address be displayed whenever the dynamic image is missing. How can I link the data-broken-image to my script for the dealership address?
Thanks
Uploading: data-broken_image.jpg…
Uploading: script_concession.jpg…
Something like this?
For records 1 and 2 there is a logo and the third dealership does not have logo.
This I achieved using a post pagination script which targets the broken image using the following selector: #dynamic-image[data-broken-image]
Hello,
Thank you for your response, it works. But I missed some information during my first message, our client wants, when the image is missing, to have a default image, which I wrote as follows results.attr(‘src’,‘images/U99999.tif’), and below that the address of the dealership. This should only be displayed for missing images. I can’t get these two elements to show up at the same time.
Thanks
In that case you could set the src attribute of the image to the desired placeholder holder image and add the address after the image (instead of replacing) like this:
results.attr('src','images/placeholder_logo.png')
results.after(`<p><b>${record.fields.name}</b><br>${record.fields.address}</p>`)
That’s perfect; thank you for your valuable advice.



