I have a COTG app with multiple “hidden” pages,
End user clicks on the button, to see/annotate the page, clicks button to close again.
They wanted to know if the page had already been worked on without opening it up to check. I added a function to check for the annotation image and if present change the button text
The problem comes up if the end user closes the COTG form and then opens it back up. The button text reverts back to it’s original text in this case “Mirror Measure” not “Mirror Measure-Started”.
I have tried using $(document).ready, onload and various other methods to run the script to change the text back when the form is opened again. But none have worked, this is due to the fact that var image = element[0].getAttribute(‘value’); always returns null when run using .ready/onload etc. From console log in COTG app
If you click on a button that runs the script again, then getAttribute(‘value’) returns a value from last time document was opened.
Any thoughts on how I can get the correct info when the form initially opens? With out the user having to click on anyting.
Jerry