Hide Show Annotation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 03:57 PM
Hello,
I was trying to HIDE / SHOW an Annotation, if particular business condition is met.
Unfortunately, after trying this via CLIENT SCRIPT and UI POLICY and by also following steps from different forums, it still didn't work.
Here's my Annotation HTML script (FORM Layout / Form Design) Excerpt ONLY:
<divid id="anno1" style = "line-height:2; font-size:13.4px;">Attachment Required</divid>
In CLIENT SCRIPT and UI POLICY Excerpt ONLY:
var statusx = g_form.getValue('status');
if (statusx == 'Draft'){
document.getElementById("anno1").parentNode.style.display="block";
}
else {
document.getElementById("anno1").parentNode.style.display="none";
}
}
The Browser DEV Tool is giving me this error -
Uncaught TypeError: Cannot read property 'getElementById' of null
Am I missing something here?
Appreciate your time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 05:47 AM
Well then I would suggest to use div instead of divid.
and the below code:
document.getElementById('anno1').style.display = 'none';
Let me know if this was useful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2023 08:24 PM
maybe try this keyword eg. this.document....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2024 06:19 AM
Hello,
I am on Vancouver version and the latest solution here does not work, did somebody manage to make this work in Vancouver?
Thanks!